We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 331dea1 commit fbc5ed7Copy full SHA for fbc5ed7
.dockerignore
@@ -0,0 +1,5 @@
1
+node_modules
2
+npm-debug.log
3
+Dockerfile
4
+docker
5
+.dockerignore
Dockerfile
@@ -0,0 +1,17 @@
+FROM node:lts-alpine as build-stage
+RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
+
+WORKDIR /home/node/app
6
+COPY package*.json ./
7
8
+USER node
9
10
+RUN npm install
11
+COPY --chown=node . .
12
+RUN npm run build
13
14
+FROM nginx:stable-alpine as production-stage
15
+COPY --from=build-stage /home/node/app/dist /usr/share/nginx/html
16
+EXPOSE 80
17
+CMD ["nginx", "-g", "daemon off;"]
0 commit comments