Skip to content

Commit ec29d71

Browse files
committed
build(docker): update Dockerfile to use pnpm
1 parent 84d277b commit ec29d71

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# Stage 1: build the application
2-
FROM node:19 as build-app
2+
FROM node:19 AS build-app
33
WORKDIR /app
44
COPY . .
5-
RUN npm i
6-
RUN npm run build
5+
RUN npm install -g pnpm
6+
RUN pnpm install
7+
RUN pnpm run build
78

8-
# Stage 2: Build nginx
9+
# Stage 2: Build nginx
910
FROM nginx:alpine AS build-nginx
1011
WORKDIR /usr/share/nginx/html/
1112
COPY --from=build-app /app/public /usr/share/nginx/html/
1213
RUN rm -rf /etc/nginx/conf.d/*
1314
COPY nginx.conf /etc/nginx/
1415
EXPOSE 80
1516

16-
# Stage 2: final image
17+
# Stage 3: final image
1718
FROM alpine:latest
1819
RUN apk add --no-cache nginx && mkdir -p /run/nginx
1920
COPY --from=build-nginx /usr/share/nginx/html/ /usr/share/nginx/html/

0 commit comments

Comments
 (0)