Skip to content

Commit

Permalink
build: add node user, update image base.
Browse files Browse the repository at this point in the history
  • Loading branch information
morganney committed Dec 13, 2023
1 parent cd3a90b commit 58da774
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ RUN npm run build -w api
RUN npm run build -w ui
EXPOSE 3000 5173 9000

FROM node:20.10-alpine3.18 AS busmap
FROM node:20.10-bookworm-slim AS busmap
WORKDIR /app
COPY --from=builder /app/package.json package.json
COPY --from=builder /app/package-lock.json package-lock.json
COPY --from=builder /app/packages/api/dist packages/api/dist
COPY --from=builder /app/packages/api/package.json packages/api/package.json
COPY --from=builder /app/packages/common/package.json packages/common/package.json
COPY --chown=node:node --from=builder /app/package.json package.json
COPY --chown=node:node --from=builder /app/package-lock.json package-lock.json
COPY --chown=node:node --from=builder /app/packages/api/dist packages/api/dist
COPY --chown=node:node --from=builder /app/packages/api/package.json packages/api/package.json
COPY --chown=node:node --from=builder /app/packages/common/package.json packages/common/package.json
RUN npm install --package-lock-only && npm ci --omit=dev
EXPOSE 3000

Expand Down
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- db
- session
init: true
user: node
build:
context: .
target: busmap
Expand Down

0 comments on commit 58da774

Please sign in to comment.