diff --git a/Dockerfile b/Dockerfile index ed95b6c..bc19a48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,6 @@ RUN python setup.py install ADD docker/run.sh /opt/run.sh RUN chmod 777 /opt/run.sh +EXPOSE 57575 + CMD ["/opt/run.sh"] \ No newline at end of file diff --git a/docker/run.sh b/docker/run.sh index 3489294..4b4e7ec 100644 --- a/docker/run.sh +++ b/docker/run.sh @@ -3,4 +3,11 @@ # Set password echo "root:${PASSWORD}" | chpasswd -/opt/app/butterfly.server.py --unsecure --host=0.0.0.0 \ No newline at end of file +if [ -z ${PORT} ] +then + echo "Starting on default port: 57575" + /opt/app/butterfly.server.py --unsecure --host=0.0.0.0 +else + echo "Starting on port: ${PORT}" + /opt/app/butterfly.server.py --unsecure --host=0.0.0.0 --port=${PORT} +fi \ No newline at end of file