-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (45 loc) · 1.4 KB
/
Dockerfile
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# build
# FROM node:12.7-alpine AS build-step
FROM node:12.16.2-alpine3.9 AS build-step
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ /app/
RUN npm install -g @angular/cli@7.3.9
ARG configuration=production
RUN npm run build -- --output-path=./dist/out --configuration $configuration
# run
FROM nginx:1.16.1-alpine
COPY --from=build-step /app/dist/out/ /usr/share/nginx/html/
#Copy default nginx configuration
COPY nginx-custom.conf /etc/nginx/conf.d/default.conf
# COPY --from=build-step /app/dist/SWE645_Frontend /usr/share/nginx/html/
# COPY --from=build-step /app/nginx.conf /etc/nginx/conf.d/default.conf
# CMD ng serve --host 0.0.0.0 --disableHostCheck true
# EXPOSE 53812
# COPY nginx.conf /etc/nginx/nginx.conf
# FROM node:12.16.2-alpine3.9 AS build-step
# WORKDIR /app
# ENV PATH /app/node_modules/.bin:$PATH
# COPY package.json ./
# RUN npm install
# RUN npm install -g @angular/cli@7.3.9
# COPY . .
# RUN npm run build
# CMD ng serve --host 0.0.0.0 --disableHostCheck true
# EXPOSE 4200
# # base image
# FROM node:12.2.0
# # set working directory
# WORKDIR /app
# # add `/app/node_modules/.bin` to $PATH
# ENV PATH /app/node_modules/.bin:$PATH
# # install and cache app dependencies
# COPY package.json /app/package.json
# RUN npm install
# RUN npm install -g @angular/cli@7.3.9
# # add app
# COPY . /app
# # start app
# CMD ng serve --host 0.0.0.0 --disableHostCheck true
# EXPOSE 4200