Fix multi-stage container build
This commit is contained in:
@@ -24,13 +24,12 @@ COPY . .
|
|||||||
# [optional] tests & build
|
# [optional] tests & build
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
# RUN bun test
|
# RUN bun test
|
||||||
# RUN bun run build
|
RUN bun build --target bun --outdir build index.ts
|
||||||
|
|
||||||
# copy production dependencies and source code into final image
|
# copy production dependencies and source code into final image
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
COPY --from=install /temp/prod/node_modules node_modules
|
COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY --from=prerelease /usr/src/app/build/index.js .
|
COPY --from=prerelease /usr/src/app/build/index.js .
|
||||||
COPY --from=prerelease /usr/src/app/package.json .
|
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
USER bun
|
USER bun
|
||||||
|
|||||||
Reference in New Issue
Block a user