Created
August 3, 2022 10:11
-
-
Save Dimfred/5d6a9577fa9a971ae905b0a5ec1b0dab to your computer and use it in GitHub Desktop.
poetry for python3.9 alpine linux (ssh enabled)
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.9-alpine | |
################################################################################ | |
# PYTHON INIT | |
ENV PYTHONUNBUFFERED=1 \ | |
PYTHONDONTWRITEBYTECODE=1 \ | |
LANG=C.UTF-8 \ | |
PIP_NO_CACHE_DIR=off \ | |
PIP_DISABLE_PIP_VERSION_CHECK=on \ | |
PIP_DEFAULT_TIMEOUT=100 | |
################################################################################ | |
# SSH SETUP | |
RUN apk update && apk add curl openssh-client build-base linux-headers git | |
RUN mkdir -p -m 0600 /root/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts | |
################################################################################ | |
# POETRY | |
RUN pip3 install --upgrade pip \ | |
&& pip3 install poetry \ | |
&& poetry config virtualenvs.create false | |
################################################################################ | |
# INSTALL | |
# COPY .pyproject.toml ./poetry.lock ./ | |
# RUN --mount=type=ssh poetry install --no-dev --no-interaction --no-ansi -vvv | |
# RUN apk del curl openssh-client build-base linux-headers git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment