29 lines
716 B
Docker
29 lines
716 B
Docker
# Choosing the image to use
|
|
FROM node:buster
|
|
|
|
ENV MY_IP=10.2.2.2
|
|
|
|
# Installing required libraries
|
|
RUN apt-get update && \
|
|
apt-get install -y net-tools iputils-ping python-pip && \
|
|
pip install flask && \
|
|
pip install requests && \
|
|
mkdir mydir && \
|
|
cd mydir && \
|
|
npm install express && \
|
|
npm install yargs && \
|
|
npm install systeminformation && \
|
|
npm install request && \
|
|
wget http://homepages.laas.fr/smedjiah/tmp/gateway.js
|
|
|
|
COPY bootstrap_client.py /mydir
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN echo "nohup python /mydir/bootstrap_client.py &" > start.sh && \
|
|
echo "/bin/bash" >> start.sh && \
|
|
chmod 777 start.sh
|
|
|
|
# Mandatory entrypoint in containernet
|
|
ENTRYPOINT ./start.sh
|
|
|