Skip to content

Commit

Permalink
Merge pull request dockersamples#101 from thaJeztah/improve-result-do…
Browse files Browse the repository at this point in the history
…ckerfile

Optimize result image
  • Loading branch information
Mano Marks authored Jan 4, 2018
2 parents e5dfa47 + 45788a5 commit ae9ea75
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions result/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM node:8.9-slim
FROM node:8.9-alpine

RUN mkdir -p /app
WORKDIR /app

RUN npm install -g nodemon
ADD package.json /app/package.json
RUN npm config set registry http://registry.npmjs.org
RUN npm install && npm ls
RUN mv /app/node_modules /node_modules

ADD . /app
RUN npm config set registry https://registry.npmjs.org
COPY package.json /app/package.json
RUN npm install \
&& npm ls \
&& npm cache clean --force \
&& mv /app/node_modules /node_modules
COPY . /app

ENV PORT 80
EXPOSE 80
Expand Down

0 comments on commit ae9ea75

Please sign in to comment.