icds/Dockerfiles/forContainerNet/server/Dockerfile
Abdel-Kader Chabi-Sika-Boni a6aeba0a24 mise a jour
2020-12-30 23:51:47 +01:00

27 lines
820 B
Docker

# Choosing the image to use
FROM node:buster
# Defining variables to allow flexibility (each variable can be set while building through the parameter --build-arg <varname>=<value>)
ARG local_ip=127.0.0.1
ARG local_port=8080
ARG local_name=srv
# Installing required libraries
RUN apt-get update && \
apt-get install -y net-tools iputils-ping && \
mkdir mydir && \
cd mydir && \
npm install express && \
npm install yargs && \
npm install systeminformation && \
npm install request && \
wget http://homepages.laas.fr/smedjiah/tmp/server.js
ENV LAUNCHER "node /mydir/server.js --local_ip '$local_ip' --local_port '$local_port' --local_name '$local_name'"
ENV VIM_EMU_CMD "nohup $LAUNCHER &"
#ENV VIM_EMU_CMD_STOP "TODO at shutdown"
# Mandatory entrypoint in containernet
CMD /bin/bash