Browse Source

node_modules

master
zeus 4 years ago
parent
commit
39a625749f
  1. 28
      Dockerfile.iot-example

28
Dockerfile.iot-example

@ -4,6 +4,7 @@ FROM node:alpine
LABEL MAINTAINERS="Guillaume Scheibel <guillaume.scheibel@gmail.com>, Damien DUPORTAL <damien.duportal@gmail.com>" LABEL MAINTAINERS="Guillaume Scheibel <guillaume.scheibel@gmail.com>, Damien DUPORTAL <damien.duportal@gmail.com>"
# Installing package required for the runtime # Installing package required for the runtime
# build/llo-base-images/asciidoctor-alpine/docker-asciidoctor
RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
curl \ curl \
@ -48,22 +49,25 @@ COPY iot-swarm-example /home/node/iot-swarm-example/
RUN chown -R node.node /home/node \ RUN chown -R node.node /home/node \
&& chmod -R 755 /home/node && chmod -R 755 /home/node
WORKDIR /home/node/iot-swarm-example WORKDIR /home/node/iot-swarm-example/src/browser-client
VOLUME /home/node/iot-swarm-example #ENV NODE_PATH=/usr/local/lib/node_modules
ENV NODE_PATH=/usr/local/lib/node_modules
USER node USER node
RUN cd /home/node/iot-swarm-example/src/browser-client \ RUN set -uex; \
set -uex; \ npm install; \
npm install \ npm audit fix; \
npm cache clean --force \ npm cache clean --force;
cd /home/node/iot-swarm-example/src/IoT \
npm install \
npm cache clean --force;
WORKDIR /home/node/iot-swarm-example/src/IoT
RUN set -uex; \
npm install; \
npm audit fix; \
npm cache clean --force;
WORKDIR /home/node/iot-swarm-example
VOLUME /home/node/iot-swarm-example
EXPOSE 8080 8088 8084 3081 EXPOSE 8080 8088 8084 3081
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

Loading…
Cancel
Save