.
This commit is contained in:
32
Dockerfile-swmu
Normal file
32
Dockerfile-swmu
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user