Skip to content

Commit ad2b6e5

Browse files
committed
Refactor Dockerfile to streamline build steps and optimize multi-stage setup
1 parent 67eb936 commit ad2b6e5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ WORKDIR /app
44
COPY . .
55
COPY src/commitInfo.json /app/src/commitInfo.json
66

7-
RUN corepack enable
8-
RUN yarn install --frozen-lockfile
9-
RUN yarn build \
10-
&& rm dist/*.d.ts dist/*.js.map
7+
RUN corepack enable \
8+
&& yarn install --frozen-lockfile \
9+
&& yarn build \
10+
&& rm dist/*.d.ts dist/*.js.map
1111

1212
# New stage to install only production dependencies
1313
FROM --platform=$BUILDPLATFORM node:22-alpine AS deps
1414
WORKDIR /app
1515
COPY package.json yarn.lock .yarnrc.yml ./
16-
RUN corepack enable
17-
RUN yarn install --immutable
18-
RUN yarn workspaces focus --production --all
16+
RUN corepack enable \
17+
&& yarn install --immutable \
18+
&& yarn workspaces focus --production --all
1919

2020
FROM node:22-alpine AS app
2121
ENV NODE_ENV=production

0 commit comments

Comments
 (0)