22 lines
509 B
Docker
22 lines
509 B
Docker
# 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
|
|
|
|
COPY bootstrap_server.py /mydir
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN echo "nohup python /mydir/bootstrap_server.py &" > start.sh && \
|
|
echo "/bin/bash" >> start.sh && \
|
|
chmod 777 start.sh
|
|
|
|
# Mandatory entrypoint in containernet
|
|
ENTRYPOINT ./start.sh
|
|
|