Files
pse.dev/Dockerfile
Kalidou Diagne f9c0e54748 docker yarn
2024-10-30 18:52:29 +01:00

22 lines
374 B
Docker

FROM node:18-alpine3.18 as builder
RUN apk add --no-cache git curl
WORKDIR /builder
COPY . .
RUN npm i -g yarn
RUN yarn install
RUN yarn build
# Create image by copying build artifacts
FROM node:18-alpine3.18 as runner
RUN npm i -g yarn
USER node
ARG PORT=3000
WORKDIR /home/node
COPY --chown=node:node --from=builder /builder/ ./
EXPOSE ${PORT}
CMD ["yarn", "start"]