Skip to content

Commit 95b7fa7

Browse files
committed
feat(docker): copy package.json and bun.lock files correctly
Copies the package.json and bun.lock files from the build stage to the correct locations in the development and production stages of the Docker image. This ensures that the dependencies are installed correctly in both stages.
1 parent dc99377 commit 95b7fa7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ RUN bun install
77
RUN bun run build
88

99
FROM base AS build-dev-deps
10-
COPY --from=build /usr/src/app/package.json /usr/src/app/bun.lock .
10+
COPY --from=build /usr/src/app/package.json /usr/src/app
11+
COPY --from=build /usr/src/app/bun.lock /usr/src/app
1112
RUN bun install --frozen-lockfile --production
1213

1314
FROM base AS publish
14-
COPY --from=build /usr/src/app/package.json /usr/src/app/bun.lock .
15+
COPY --from=build /usr/src/app/package.json /usr/src/app
16+
COPY --from=build /usr/src/app/bun.lock /usr/src/app
1517
COPY --from=build /usr/src/app/dist dist
1618
COPY --from=build-dev-deps /usr/src/app/node_modules node_modules
1719
ENV PORT 3000

0 commit comments

Comments
 (0)