Last active
March 10, 2024 14:17
-
-
Save BSVogler/dcd99a22f7131dcfa58bb9eb60f72964 to your computer and use it in GitHub Desktop.
Poetry Dockerfile
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 python:3.12-slim-bookworm | |
#libpq-dev python3-dev for psycopg | |
RUN apt-get update && apt-get -y install git curl #libldap2-dev libsasl2-dev g++ libffi-dev libpq-dev | |
RUN /usr/local/bin/python -m pip install --upgrade pip | |
ARG CI_COMMIT_SHA=local | |
ENV CI_COMMIT_SHA=$CI_COMMIT_SHA | |
ENV PYTHONUNBUFFERED 1 | |
ARG PROJECT_ROOT="/app" | |
RUN mkdir $PROJECT_ROOT | |
WORKDIR $PROJECT_ROOT | |
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/ python3 - --version 1.8.2 | |
RUN poetry config virtualenvs.create false | |
RUN poetry config virtualenvs.options.system-site-packages true | |
ENV PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.12/site-packages/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment