Merge pull request #101 from thaJeztah/improve-result-dockerfile

Optimize result image
This commit is contained in:
Mano Marks 2018-01-04 10:25:01 -08:00 committed by GitHub
commit ae9ea759bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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