Commit d267791f authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Improve container build

parent 170dca23
.env
\ No newline at end of file
*
!/README.md
!/requirements.txt
!/setup.*
!/validata_api
\ No newline at end of file
FROM python:3.9-buster
FROM python:3.9-slim-bullseye
LABEL maintainer="admin-validata@jailbreak.paris"
EXPOSE 5000
RUN pip install --no-cache-dir gunicorn==20.0.4
# Env variables that configure Python to run in a container:
# do not keep dependencies downloaded by "pip install"
ENV PIP_NO_CACHE_DIR=1
# do not write "*.pyc" files
ENV PYTHONDONTWRITEBYTECODE=1
# do not buffer input/output operations, displaying prints and log messages immediately
ENV PYTHONUNBUFFERED=1
WORKDIR /app
EXPOSE 5000
RUN pip install gunicorn==20.0.4
COPY requirements.txt .
RUN pip install --no-cache-dir --requirement requirements.txt
RUN pip install --requirement requirements.txt
COPY . .
RUN pip install --no-cache-dir --editable .
RUN pip install --editable .
CMD gunicorn --bind 0.0.0.0:5000 validata_api:app
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment