Skip to content

Commit

Permalink
fix: update conteiner user
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-souza committed Dec 19, 2024
1 parent 357efe8 commit 16785ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ WORKDIR /usr/src/app
FROM base AS install
RUN apk update && apk add --no-cache git && rm -rf /var/cache/apk/*

# run the app

# install dev version with devDependencies
RUN mkdir -p /temp/dev
COPY package.json bun.lockb lefthook.yml .husky /temp/dev/
Expand All @@ -27,13 +29,13 @@ RUN bun run build

# copy production dependencies and source code into final image
FROM base AS release

USER bun
EXPOSE 3000/tcp

COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /usr/src/app/.next .next
COPY --from=prerelease /usr/src/app/next.config.js .
COPY --from=prerelease /usr/src/app/package.json .

# run the app
USER bun
EXPOSE 3000/tcp

CMD ["bun", "start"]

1 comment on commit 16785ae

@vercel
Copy link

@vercel vercel bot commented on 16785ae Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.