-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
49 lines (37 loc) · 887 Bytes
/
dockerfile
File metadata and controls
49 lines (37 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# FROM node:17.7.2 as builder
# WORKDIR /app
# COPY package*.json .
# RUN npm ci && npm cache clean --force
# COPY . .
# RUN npm run build
# EXPOSE 4200
# CMD ["npm", "run", "start"]
# FROM nginx:1.17.10-alpine
# EXPOSE 80
# COPY --from=builder /app/dist/foodloop /usr/share/nginx/html
FROM node:17.7.2 AS foodloop-build
WORKDIR /app
COPY . .
RUN npm install && npm run build
FROM nginx:alpine
COPY --from=foodloop-build /app/dist/foodloop /usr/share/nginx/html
EXPOSE 80
# stage 2
# FROM nginx:alpine
# COPY /dist/foodloop /usr/share/nginx/html
# EXPOSE 80
# FROM node:17.7.2 AS ng-build
# WORKDIR /app
# RUN npm ci && npm run build
# COPY . .
# CMD [ "npm","run","start" ]
# EXPOSE 4200
# FROM node:17.7.2
# WORKDIR /app
# COPY package.json .
# RUN npm ci && npm cache clean --force
# COPY . .
# RUN npm run build
# EXPOSE 4200
# CMD ["npm", "run", "start"]
# stage 2