commit cbf0c442dd3770e4b8e72ea85f335f17a50bc0e9 Author: Martin Fencl Date: Mon Jan 17 10:30:03 2022 +0100 . diff --git a/Dockerfile-swmu b/Dockerfile-swmu new file mode 100644 index 0000000..87ff4ef --- /dev/null +++ b/Dockerfile-swmu @@ -0,0 +1,32 @@ +# FROM python:3.9 + +FROM ubuntu:20.04 +ARG DEBIAN_FRONTEND=noninteractive +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get dist-upgrade -y && \ + apt-get install -y \ + locales `# get rid of 'missing locales' messages` \ + libreadline-dev `# readline compilation support` \ + less nano netcat net-tools telnet vim `# user tools` \ + git openssh-client `# release job` \ + python3-pip + +ENV PYTHONUNBUFFERED 1 +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 +ENV FLASK_APP=swmu/run_api.py + +WORKDIR /code +COPY requirements.txt ./ + +RUN pip3 install --upgrade pip && \ + pip3 install -Ur requirements.txt -i https://pypi.princip.cz +RUN echo 'alias runswmu="python3 -m swmu.run"' >> ~/.bashrc +RUN echo 'alias runswmu_api="python3 swmu/run_api.py"' >> ~/.bashrc +RUN echo 'alias helpswmu="cat /code/README_examples"' >> ~/.bashrc +RUN echo "pgrep -af python" >> ~/.bashrc # check status +#RUN echo "cat /code/README_examples" >> ~/.bashrc + +COPY . . + +ENTRYPOINT python3 swmu/run_api.py --host=0.0.0.0 --port=80