Create an echo service docker image.
This commit is contained in:
17
kubernetes/autoscale/service/Dockerfile
Normal file
17
kubernetes/autoscale/service/Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user