mise a jour
This commit is contained in:
parent
1bb974385e
commit
66e5a9c823
5 changed files with 0 additions and 88 deletions
|
@ -1 +0,0 @@
|
|||
debconf: delaying package configuration, since apt-utils is not installed
|
|
@ -1,27 +0,0 @@
|
|||
# Choosing the image to use
|
||||
FROM node:buster
|
||||
|
||||
# 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
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import subprocess
|
||||
import requests
|
||||
|
||||
|
||||
BOOTSTRAP_SERVER_ADDRESS = '10.10.10.10:5555'
|
||||
|
||||
def retrieve_config():
|
||||
my_config = "None"
|
||||
my_ip = subprocess.check_output("sleep 5 && echo $MY_IP", shell=True).rstrip()
|
||||
resp = requests.get("http://%s/getmyconfig/%s"%(BOOTSTRAP_SERVER_ADDRESS, my_ip))
|
||||
my_config = resp.text
|
||||
if my_config != "None":
|
||||
subprocess.check_output("node /mydir/*.js %s"%(my_config), shell=True)
|
||||
#print("my_ip=%s and of type %s"%(my_ip,type(my_ip)))
|
||||
|
||||
retrieve_config()
|
|
@ -1,19 +0,0 @@
|
|||
# Choosing the image to use
|
||||
FROM node:buster
|
||||
|
||||
# Installing required libraries
|
||||
RUN apt-get update && \
|
||||
apt-get install -y net-tools iputils-ping && \
|
||||
mkdir server && \
|
||||
cd server && \
|
||||
npm install express && \
|
||||
npm install yargs && \
|
||||
npm install systeminformation && \
|
||||
wget http://homepages.laas.fr/smedjiah/tmp/server.js
|
||||
|
||||
ENV VIM_EMU_CMD "node /server/server.js --local_ip '127.0.0.1' --local_port '8080' --local_name 'srv'"
|
||||
#ENV VIM_EMU_CMD_STOP "TODO at shutdown"
|
||||
|
||||
# Mandatory entrypoint in containernet
|
||||
CMD /bin/bash
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# Choosing the image to use
|
||||
FROM node:buster
|
||||
|
||||
# Installing required libraries
|
||||
RUN apt-get update && \
|
||||
apt-get install -y net-tools iputils-ping && \
|
||||
mkdir server && \
|
||||
cd server && \
|
||||
npm install express && \
|
||||
npm install yargs && \
|
||||
npm install systeminformation && \
|
||||
wget http://homepages.laas.fr/smedjiah/tmp/server.js
|
||||
|
||||
ENV LAUNCHER "node /server/server.js --local_ip '127.0.0.1' --local_port '8080' --local_name 'srv'"
|
||||
|
||||
#ENV VIM_EMU_CMD "nohup $LAUNCHER &"
|
||||
#ENV VIM_EMU_CMD_STOP "TODO at shutdown"
|
||||
|
||||
RUN echo "nohup $LAUNCHER &" > /server/entrypoint.sh
|
||||
RUN echo "/bin/bash" >> /server/entrypoint.sh && chmod 777 /server/entrypoint.sh
|
||||
# Mandatory entrypoint in containernet
|
||||
CMD ./server/entrypoint.sh
|
||||
|
Loading…
Reference in a new issue