icds/Dockerfiles/forContainerNet/device/Dockerfile
2020-12-11 18:43:27 +01:00

23 lines
1.1 KiB
Docker

# Choosing the image to use
FROM node:alpine
# Installing required libraries
RUN apk add npm && \
apk add bash && \
mkdir device && \
cd device && \
npm install express && \
npm install yargs && \
npm install systeminformation && \
npm install request && \
wget http://homepages.laas.fr/smedjiah/tmp/device.js
# set entry point for emulator gatekeeper (needed for compatibility with vim-emu datacenters)
#ENV VIM_EMU_CMD "node /device/device.js --local_ip "127.0.0.1" --local_port 9001 --local_name "dev1" --remote_ip "127.0.0.1" --remote_port 8282 --remote_name "gwf1" --send_period 3000" #uncomment when on ContainerNet datacenter
#ENV VIM_EMU_CMD "TODO at startup"
#ENV VIM_EMU_CMD_STOP "TODO at shutdown"
# CMD should always point to /bin/bash to not block the emulator (sh for node:alpine)
CMD node /device/device.js --local_ip "127.0.0.1" --local_port 9001 --local_name "dev1" --remote_ip "127.0.0.1" --remote_port 8282 --remote_name "gwf1" --send_period 3000 #comment when on ContainerNet datacenter
#CMD /bin/bash #uncomment when on ContainerNet datacenter