2022-11-22 18:32:57 +00:00
|
|
|
FROM ghcr.io/sartography/python:3.11
|
|
|
|
|
|
|
|
RUN useradd _gunicorn --no-create-home --user-group
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y -q \
|
|
|
|
gcc libssl-dev \
|
2022-12-05 15:46:26 +00:00
|
|
|
curl gunicorn3
|
2022-11-22 18:32:57 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml poetry.lock /app/
|
2023-10-14 16:44:56 +00:00
|
|
|
RUN poetry install
|
2022-11-22 18:32:57 +00:00
|
|
|
|
|
|
|
RUN set -xe \
|
|
|
|
&& apt-get remove -y gcc python3-dev libssl-dev \
|
|
|
|
&& apt-get autoremove -y \
|
|
|
|
&& apt-get clean -y \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY . /app/
|
|
|
|
|
|
|
|
# run poetry install again AFTER copying the app into the image
|
|
|
|
# otherwise it does not know what the main app module is
|
2023-10-14 16:44:56 +00:00
|
|
|
RUN poetry install
|
2022-11-22 18:32:57 +00:00
|
|
|
|
|
|
|
CMD ./bin/boot_server_in_docker
|