playlist-entry-validator/Dockerfile

17 lines
341 B
Docker
Raw Normal View History

FROM node:lts-alpine AS build
2024-07-22 08:52:50 +02:00
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
2024-07-22 08:52:50 +02:00
RUN npm run build
FROM node:lts-alpine AS runtime
USER node
WORKDIR /app
ENV NODE_ENV production
2024-07-22 09:25:14 +02:00
COPY --chown=node:node package*.json ./
RUN npm ci --omit=dev
2024-07-22 09:25:14 +02:00
COPY --from=build --chown=node:node /app/dist ./dist
2024-07-22 08:52:50 +02:00
EXPOSE 3000
CMD ["node", "./dist/index.js"]