You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.7 KiB

4 years ago
#FROM alpine:3.11
FROM node:alpine
LABEL MAINTAINERS="Guillaume Scheibel <guillaume.scheibel@gmail.com>, Damien DUPORTAL <damien.duportal@gmail.com>"
# Installing package required for the runtime
4 years ago
# build/llo-base-images/asciidoctor-alpine/docker-asciidoctor
4 years ago
RUN apk add --no-cache \
bash \
curl \
ca-certificates \
findutils \
font-bakoma-ttf \
git \
graphviz \
inotify-tools \
make \
python3 \
py3-pillow \
py3-setuptools \
tzdata \
unzip \
build-base \
libxml2-dev \
which
# Installing Python dependencies for additional
# functionnalities
RUN apk add --no-cache --virtual .pythonmakedepends \
build-base \
python3-dev \
py3-pip \
&& pip3 install --no-cache-dir \
actdiag \
pip install supervisor supervisor-stdout \
'blockdiag[pdf]' \
nwdiag \
seqdiag \
&& apk del -r --no-cache .pythonmakedepends
RUN ln -s /usr/local/bin/node /usr/bin/node
ADD supervisord.conf /etc/supervisor/supervisord.conf
ADD supervisord-iot.conf /etc/supervisor/conf.d/node-app.conf
COPY iot-swarm-example /home/node/iot-swarm-example/
RUN chown -R node.node /home/node \
&& chmod -R 755 /home/node
4 years ago
WORKDIR /home/node/iot-swarm-example/src/browser-client
#ENV NODE_PATH=/usr/local/lib/node_modules
4 years ago
USER node
4 years ago
RUN set -uex; \
npm install; \
npm audit fix; \
npm cache clean --force;
4 years ago
4 years ago
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
4 years ago
EXPOSE 8080 8088 8084 3081
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
4 years ago