Skip to content

Commit 0111a66

Browse files
committed
Switch pnpm install path to WORKDIR for lint compatibility
1 parent 9eebff7 commit 0111a66

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎Dockerfile‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ WORKDIR /app
88
RUN apk add --no-cache libc6-compat yq build-base g++ cairo-dev jpeg-dev pango-dev giflib-dev --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
99
# Install pnpm
1010
COPY package.json ./
11-
RUN cd / \
12-
&& ENV="$HOME/.shrc" SHELL=/bin/sh npx --yes get-pnpm \
11+
WORKDIR /
12+
RUN ENV="$HOME/.shrc" SHELL=/bin/sh npx --yes get-pnpm \
1313
"$(node --input-type=module --eval \
1414
'console.log((await import("/app/package.json", { with: { type: "json" } })).default.devEngines.packageManager.version)')"
15+
WORKDIR /app
1516
# Copy the content of the project to the machine
1617
COPY . .
1718
RUN yq --inplace --output-format=json '(.dependencies = .dependencies * (.devDependencies | to_entries | map(select(.key | test("^(typescript|@types/*|eslint-config-upleveled)$"))) | from_entries)) | (.devDependencies = {})' package.json
@@ -28,10 +29,11 @@ WORKDIR /app
2829
RUN apk add bash postgresql cairo pango jpeg musl giflib pixman pangomm libjpeg-turbo freetype
2930
# Install pnpm
3031
COPY --from=builder /app/package.json ./
31-
RUN cd / \
32-
&& ENV="$HOME/.shrc" SHELL=/bin/sh npx --yes get-pnpm \
32+
WORKDIR /
33+
RUN ENV="$HOME/.shrc" SHELL=/bin/sh npx --yes get-pnpm \
3334
"$(node --input-type=module --eval \
3435
'console.log((await import("/app/package.json", { with: { type: "json" } })).default.devEngines.packageManager.version)')"
36+
WORKDIR /app
3537

3638
# Copy built app
3739
COPY --from=builder /app/.next ./.next

0 commit comments

Comments
 (0)