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 1aff6554b5
All checks were successful
/ Misc Linters (push) Successful in 20s
/ Build App (push) Successful in 52s
Copy node_modules over to runtime image
2024-08-17 16:37:29 +02:00

19 lines
394 B
Docker

FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
RUN chown -R node:node /app
USER node:node
COPY ./container/entrypoint.sh /entrypoint.sh
COPY package.json .
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/build ./build
ENTRYPOINT ["sh", "/entrypoint.sh"]