All checks were successful
Build and push Docker image / build (push) Successful in 2m26s
fixes https://stackoverflow.com/a/75730731
19 lines
481 B
Docker
19 lines
481 B
Docker
# Credit: https://www.digitalocean.com/community/tutorials/how-to-build-a-node-js-application-with-docker
|
|
|
|
FROM node:24-trixie-slim AS builder
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci --only=production && npm cache clean --force
|
|
COPY . .
|
|
|
|
FROM node:24-trixie-slim AS production
|
|
|
|
WORKDIR /app
|
|
RUN addgroup --gid 1001 nodejs && \
|
|
adduser --gid 1001 --uid 1001 nodejs
|
|
COPY --from=builder --chown=nodejs:nodejs /app /app
|
|
USER nodejs
|
|
EXPOSE 6567
|
|
|
|
CMD ["npm", "run", "server"] |