fix: use debian-based container for image building
All checks were successful
Build and push Docker image / build (push) Successful in 2m26s

fixes https://stackoverflow.com/a/75730731
This commit is contained in:
2025-12-07 20:21:45 +01:00
parent 2e325fe018
commit 8fb05f2662

View File

@@ -1,19 +1,19 @@
# Credit: https://www.digitalocean.com/community/tutorials/how-to-build-a-node-js-application-with-docker
FROM node:22-alpine AS builder
FROM node:24-trixie-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production && npm cache clean --force
COPY . .
FROM node:22-alpine AS production
FROM node:24-trixie-slim AS production
WORKDIR /app
RUN addgroup -g 1001 -S nodejs && \
adduser -S js -u 1001
COPY --from=builder --chown=js:nodejs /app /app
USER js
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"]