Skip to content

Commit

Permalink
docker: concat RUN actions to make resulting image smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
sitnik committed Dec 14, 2017
1 parent faef619 commit 92858be
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ RUN mkdir -p ${WORK_DIR} \

WORKDIR ${WORK_DIR}

RUN apk add --no-cache --virtual .gyp \
python \
make \
g++

COPY . ${WORK_DIR}

RUN npm install \
&& apk del .gyp

RUN npm install pm2 -g
RUN apk add --no-cache --virtual .gyp \
python make g++ \
&& npm install \
&& apk del .gyp \
&& npm install pm2 -g \
&& npm cache clean --force

EXPOSE 1883
CMD ["pm2-docker", "src/broker.js"]
CMD ["pm2-docker", "src/broker.js"]

0 comments on commit 92858be

Please sign in to comment.