sso-core/Dockerfile
2024-11-23 18:17:04 +02:00

27 lines
527 B
Docker

# Build the application with a specific environment
FROM node:22-alpine AS builder
WORKDIR /usr/src/app
COPY . .
RUN npm ci
RUN npm run build
# Create the executor image
FROM node:22-alpine
WORKDIR /app
COPY --from=builder --chown=node:node /usr/src/app/build ./build
COPY --from=builder --chown=node:node /usr/src/app/migrations ./migrations
COPY --from=builder --chown=node:node /usr/src/app/package* .
RUN npm ci --omit=dev
USER node
VOLUME [ "/app/private" ]
VOLUME [ "/app/uploads" ]
CMD [ "node", "/app/build" ]