We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d277b commit ec29d71Copy full SHA for ec29d71
Dockerfile
@@ -1,19 +1,20 @@
1
# Stage 1: build the application
2
-FROM node:19 as build-app
+FROM node:19 AS build-app
3
WORKDIR /app
4
COPY . .
5
-RUN npm i
6
-RUN npm run build
+RUN npm install -g pnpm
+RUN pnpm install
7
+RUN pnpm run build
8
-# Stage 2: Build nginx
9
+# Stage 2: Build nginx
10
FROM nginx:alpine AS build-nginx
11
WORKDIR /usr/share/nginx/html/
12
COPY --from=build-app /app/public /usr/share/nginx/html/
13
RUN rm -rf /etc/nginx/conf.d/*
14
COPY nginx.conf /etc/nginx/
15
EXPOSE 80
16
-# Stage 2: final image
17
+# Stage 3: final image
18
FROM alpine:latest
19
RUN apk add --no-cache nginx && mkdir -p /run/nginx
20
COPY --from=build-nginx /usr/share/nginx/html/ /usr/share/nginx/html/
0 commit comments