We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-vvv
I have written a multi-stage Dockerfile based off some of the discussions found on this repo's issues.
# syntax=docker/dockerfile:1.4 FROM ubuntu:20.04 as base-build-stage WORKDIR /example RUN DEBIAN_FRONTEND=noninteractive apt update && apt-get install -y --no-install-recommends tzdata RUN --mount=type=cache,target=/var/cache/apt apt update && apt install -y software-properties-common wget libxrender1 libxext6 libsm6 git build-essential curl \ && add-apt-repository -y 'ppa:deadsnakes/ppa' \ && apt install -y python3.10 python3.10-dev python3.10-distutils \ && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && python3.10 get-pip.py \ && rm get-pip.py \ && python3.10 -m pip install --upgrade requests ENV POETRY_VERSION=1.4.2 \ POETRY_HOME="/opt/poetry" \ POETRY_VIRTUALENVS_IN_PROJECT=true \ POETRY_NO_INTERACTION=1 \ PYSETUP_PATH="/opt/pysetup" \ VENV_PATH="/example/.venv" \ POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=true ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH" RUN curl -sSL https://install.python-poetry.org | python3.10 - \ && python3.10 -m pip install poethepoet \ && poetry config --list COPY ./pyproject.toml ./ RUN --mount=type=cache,target=/root/.cache \ poetry install --no-root RUN ls -lha /example/.venv/bin
My eventual goal is to copy the virtualenv over to another stage, so I'm setting POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=true.
POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=true
I expected that this would mean the venv would contain an executable, not a symlink. The poetry config --list returns that the setting is reflected:
venv
poetry config --list
#13 11.90 cache-dir = "/root/.cache/pypoetry" #13 11.90 experimental.new-installer = true #13 11.90 experimental.system-git-client = false #13 11.90 installer.max-workers = null #13 11.90 installer.modern-installation = true #13 11.90 installer.no-binary = null #13 11.90 installer.parallel = true #13 11.90 virtualenvs.create = true #13 11.90 virtualenvs.in-project = true #13 11.90 virtualenvs.options.always-copy = true #13 11.90 virtualenvs.options.no-pip = false #13 11.90 virtualenvs.options.no-setuptools = false #13 11.90 virtualenvs.options.system-site-packages = false #13 11.90 virtualenvs.path = "{cache-dir}/virtualenvs" # /root/.cache/pypoetry/virtualenvs #13 11.90 virtualenvs.prefer-active-python = false #13 11.90 virtualenvs.prompt = "{project_name}-py{python_version}"
The last RUN indicates however that it's just a symlink still:
RUN
#16 0.334 lrwxrwxrwx 1 root root 19 May 3 22:26 python -> /usr/bin/python3.10 #16 0.334 lrwxrwxrwx 1 root root 6 May 3 22:26 python3 -> python #16 0.334 lrwxrwxrwx 1 root root 6 May 3 22:26 python3.10 -> python
Hope I'm not missing anything obvious!
The text was updated successfully, but these errors were encountered:
duplicate #5906
Sorry, something went wrong.
I tested without using envs and it works, thanks for the quick turnaround.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
-vvv
option) and have included the output below.Issue
I have written a multi-stage Dockerfile based off some of the discussions found on this repo's issues.
My eventual goal is to copy the virtualenv over to another stage, so I'm setting
POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=true
.I expected that this would mean the
venv
would contain an executable, not a symlink.The
poetry config --list
returns that the setting is reflected:The last
RUN
indicates however that it's just a symlink still:Hope I'm not missing anything obvious!
The text was updated successfully, but these errors were encountered: