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 5e49764 commit 962b062Copy full SHA for 962b062
Dockerfile
@@ -1,13 +1,16 @@
1
# Stage 1: build the application
2
-FROM nginx:alpine AS build-nginx
+FROM node:19 as build-app
3
WORKDIR /app
4
-RUN apk add nodejs npm
5
COPY . .
6
RUN npm i
7
RUN npm run build
+
8
+# Stage 2: Build nginx
9
+FROM nginx:alpine AS build-nginx
10
+WORKDIR /usr/share/nginx/html/
11
+COPY --from=build-app /app/public /usr/share/nginx/html/
12
RUN rm -rf /etc/nginx/conf.d/*
13
COPY nginx.conf /etc/nginx/
-COPY public /usr/share/nginx/html/
14
EXPOSE 80
15
16
# Stage 2: final image
0 commit comments