Add Dockerfile

This commit is contained in:
Nick
2023-07-07 09:37:27 +03:00
parent 52015b00d0
commit 2ee8fb1620

20
Dockerfile Normal file
View File

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