Files
Bogdan Chadkin bc618d42fe experimental: add missing pieces to docker template (#4783)
- Got rid of peer dependencies warnings
- Added missing files in template
- reduced install time of dependencies
- added docker to init options
2025-01-25 17:56:20 +07:00

20 lines
538 B
Docker

FROM node:22-alpine AS dependencies-env
COPY .npmrc package.json /app/
WORKDIR /app
RUN npm install --omit=dev
FROM dependencies-env AS build-env
COPY . /app/
WORKDIR /app
RUN npm install
RUN npm run build
FROM node:22-alpine
COPY .npmrc package.json /app/
COPY --from=dependencies-env /app/node_modules /app/node_modules
COPY --from=build-env /app/build /app/build
COPY --from=build-env /app/public /app/public
WORKDIR /app
# there is a DOMAINS env with comma separated allowed domains for image processing
CMD ["npm", "run", "start"]