Create an echo service docker image.

This commit is contained in:
Tom Alexander
2021-07-24 21:23:40 -04:00
parent 09c7cc8d03
commit 2a225de2f9
5 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
FROM python:3.9
RUN useradd -m -g nogroup server
USER server
WORKDIR /home/server
ENV FLASK_APP=main.py
# Perform the install of requirements first to avoid re-installing on every code change
COPY requirements.txt /home/server/
RUN pip install -r /home/server/requirements.txt
COPY *.py /home/server/
# CMD ["python", "/home/server/main.py"]
CMD ["/home/server/.local/bin/gunicorn", "--config", "/home/server/gunicorn.conf.py", "main:app"]