-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
28 lines (20 loc) · 681 Bytes
/
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
# pull the Node.js Docker image
FROM node:10.23.2-alpine3.10
# maintainer
LABEL maintainer="[email protected]"
# install angular-cli
RUN npm install -g @angular/[email protected]
# create the directory inside the container
WORKDIR /opt/app
# copy the package.json files from local machine to the workdir in container
COPY package*.json ./
# run npm install in our local machine
RUN npm install
# copy the generated modules and all other files to the container
COPY src ./src
COPY angular.json .
COPY tsconfig.json .
# our app is running on port 4200 within the container, so need to expose it
EXPOSE 4200
# the command that starts our app
CMD ["ng", "serve", "--host", "0.0.0.0"]