33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
# 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
|