Skip to content

Commit 3be4c59

Browse files
committed
Add PNPM Home environement variable
1 parent c541322 commit 3be4c59

5 files changed

Lines changed: 24 additions & 2 deletions

File tree

cspell/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ FROM node:23-alpine
22

33
WORKDIR /opt/node
44

5+
ENV PNPM_HOME="/pnpm"
6+
ENV PATH="$PNPM_HOME:$PATH" \
7+
NPM_CONFIG_RETRY=5 \
8+
NPM_CONFIG_TIMEOUT=30000
9+
510
COPY package.json pnpm-lock.yaml ./
611

712
RUN npm install --ignore-scripts -g pnpm

frontend/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM node:22-alpine AS base
44
FROM base AS builder
55
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine
66
# to understand why libc6-compat might be needed.
7+
ENV PNPM_HOME="/pnpm"
8+
ENV PATH="$PNPM_HOME:$PATH"
9+
710
RUN apk add --no-cache libc6-compat
811
WORKDIR /app
912

frontend/docker/Dockerfile.e2e.test

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
FROM mcr.microsoft.com/playwright:v1.52.0-jammy
22

3-
ENV FORCE_COLOR=1
3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH" \
5+
NPM_CONFIG_RETRY=5 \
6+
NPM_CONFIG_TIMEOUT=30000
7+
48

59
WORKDIR /app
610

frontend/docker/Dockerfile.local

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ RUN apk update && \
77
chown -R node:node /home/owasp && \
88
npm install --ignore-scripts -g pnpm
99

10+
ENV PNPM_HOME="/pnpm"
11+
ENV PATH="$PNPM_HOME:$PATH" \
12+
NPM_CONFIG_RETRY=5 \
13+
NPM_CONFIG_TIMEOUT=30000
14+
1015
WORKDIR /home/owasp
1116

1217
COPY --chmod=444 --chown=node:node package.json pnpm-lock.yaml ./

frontend/docker/Dockerfile.unit.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
FROM node:22-alpine
22

3-
ENV FORCE_COLOR=1
3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH" \
5+
NPM_CONFIG_RETRY=5 \
6+
NPM_CONFIG_TIMEOUT=30000 \
7+
FORCE_COLOR=1
8+
49

510
WORKDIR /app
611

0 commit comments

Comments
 (0)