Created
December 3, 2022 22:04
-
-
Save kuzaxak/3d28d6714b51d0e8ba882d88bee56f47 to your computer and use it in GitHub Desktop.
poetry docker gunicorn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM public.ecr.aws/docker/library/python:3.11-bullseye | |
ENV POETRY_VERSION='1.2.2' \ | |
POETRY_HOME=/etc/poetry \ | |
PATH="/etc/poetry/bin:${PATH}" \ | |
POETRY_VIRTUALENVS_CREATE=false | |
WORKDIR /app | |
RUN curl -sSL https://install.python-poetry.org | python3 - && \ | |
poetry --version | |
COPY --chown=nobody:nogroup pyproject.toml poetry.lock ./ | |
RUN poetry install --no-root --no-dev | |
COPY --chown=nobody:nogroup . ./ | |
CMD [ "poetry", "run", "gunicorn", "--conf", "admin/gunicorn_conf.py", "--bind", "0.0.0.0:8080", "admin:app"] | |
# Nobody | |
USER 65534 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment