Commit cdf0865a authored by nanahira's avatar nanahira

update dockerfile

parent e2b54a9c
Pipeline #6919 passed with stages
in 36 minutes and 33 seconds
FROM node:bullseye-slim
FROM node:bullseye-slim as base
LABEL Author="Nanahira <nanahira@momobako.com>"
RUN apt update && apt -y install python3 build-essential && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /usr/src/app
COPY ./package*.json ./
RUN npm ci
FROM base as builder
RUN npm ci && npm cache clean --force
COPY . ./
RUN npm run build
CMD ["npm", "run", "start:prod"]
FROM base
ENV NODE_ENV production
RUN npm ci && npm cache clean --force
COPY --from=builder /usr/src/app/dist ./dist
EXPOSE 3000
CMD [ "npm", "run", "start:prod" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment