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.

82 lines
2.1 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
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 \
4 years ago
jq \
nginx \
&& apk add -U wireguard-tools
4 years ago
# 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
COPY dist /home/node/swarmlab-app
4 years ago
COPY src-local/ecosystem.config.js /home/node/swarmlab-app/ecosystem.config.js
#COPY src-local/llo /home/node/swarmlab-app/llo
#COPY src-local/package.json /home/node/swarmlab-app/package.json
#COPY src-local/hybrid /home/node/swarmlab-app/hybrid
#COPY src-local/instance /home/node/swarmlab-app/instance
#COPY src-local/logs /home/node/swarmlab-app/logs
#COPY src-local/myconfig /home/node/swarmlab-app/myconfig
#COPY src-local/start-server.sh /home/node/swarmlab-app/start-server.sh
#COPY src-local/stop-server.sh /home/node/swarmlab-app/stop-server.sh
4 years ago
RUN mkdir -p /home/node/run \
&& mkdir -p /home/node/logs \
&& chown -R node.node /home/node \
&& chmod -R 755 /home/node \
&& ln -s /usr/local/bin/node /usr/bin/node \
&& mkdir -p /run/nginx \
&& npm install pm2@latest -g
USER node
4 years ago
#WORKDIR /home/node/swarmlab-app
#RUN set -uex; \
# # npm run build no need it!
# npm install; \
# npm i async chokidar url-exist-sync axios socketio-auth socket.io-client https socket.io bufferutil utf-8-validate simple-git --save \
# npm audit fix; \
# npm cache clean --force;
#
4 years ago
WORKDIR /home/node/swarmlab-app
VOLUME /home/node/swarmlab-app
4 years ago
EXPOSE 80 443 8080 3000 3080
4 years ago
4 years ago
CMD ["pm2-runtime", "/home/node/swarmlab-app/ecosystem.config.js"]