File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,23 +12,23 @@ RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable
1212RUN apt-get update
1313RUN apt-get install -yq google-chrome-stable
1414
15- # set working directory
15+ # use changes to package.json to force Docker not to use the cache
16+ # when we change our application's angular dependencies:
17+ COPY package.json /tmp/package.json
18+ RUN cd /tmp && yarn install --silent
19+ # RUN yarn global add --silent @angular/cli@8.3.14
20+ RUN mkdir -p /app && cp -a /tmp/node_modules /app/
21+
22+ # From here we load our application's code in, therefore the previous docker
23+ # "layer" thats been cached will be used if possible
1624WORKDIR /app
17-
18- # add `/app/node_modules/.bin` to $PATH
19- ENV PATH /app/node_modules/.bin:$PATH
20-
21- # install and cache app dependencies
22- COPY package.json /app/package.json
23- RUN yarn add --silent node-sass
24- RUN yarn install --silent
25- RUN yarn global add --silent @angular/cli@8.3.14
26-
27- # add app
2825COPY . /app
2926
3027# Expose the port the app runs in
3128EXPOSE 4200
3229
3330# Serve the app
3431CMD ["yarn" , "docker" ]
32+
33+ HEALTHCHECK --interval=5m --timeout=3s \
34+ CMD curl -f http://localhost/ || exit 1
You can’t perform that action at this time.
0 commit comments