-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
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
Copying a virtualenv to a new docker image removes pip #1558
Comments
The default seed mechanism (app-data) links these packages from the machines application data folder. If you want self-contained folders as here please pass in the |
And this changed from pre 20.0.0 to now? pip is installed in the system python in these official python images, so it should be identical in both images. |
My bad it's |
Yes, this changed in 20.0.0, the reason we bumped from 16.7 all the way to 20 is to show while we strive for interface compatibility such edge case differences in functionality are bound to happen. You can opt out of this new behaviour though by passing that flag. |
Thanks for your help! |
This fixes our multi-stage docker builds. See pypa/virtualenv#1558
This fixes our multi-stage docker builds. See pypa/virtualenv#1558
We now switched to app-data to use copy by default, so the seeder pip should not be needed 👍 Hello, a fix for this issue has been released via virtualenv 20.0.2; see https://pypi.org/project/virtualenv/20.0.2/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-2-2020-02-11) . Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
Using 20.0.2 does indeed fix things without needing the |
As part of our build process we use a multi-stage docker file that builds a virtualenv in one image, then copies that environment to the final image. This has worked well for months until today which I discovered corresponds to the release of 20.0.0. The following minimal Dockerfile demonstrates the problem:
When you build this file (e.g. with
docker build .
) it will fail with:If I change the virtualenv version above to
16.7.9
it works as expected and the 2nd call to pip works. It also works if I change said line toRUN python -m venv /venv
. I have worked around the issue by using the latter as it is sufficient for our use case, but I thought I'd file anyway since it might point to some larger change and potential issue.The text was updated successfully, but these errors were encountered: