This repository has been archived on 2024-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
fotochallenge/Containerfile
Valentin Brandl 19f0bbe82e
All checks were successful
/ Build App (push) Successful in 53s
Publish / tests (push) Successful in 52s
Publish / Publishing (push) Successful in 1m22s
Use alpine image for smaller final image
2024-07-17 13:10:17 +02:00

16 lines
264 B
Docker

FROM node:21-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:21-alpine
USER node:node
WORKDIR /app
COPY package.json .
COPY --from=builder /app/build ./build
CMD ["node", "./build/index.js"]