-
Notifications
You must be signed in to change notification settings - Fork 1.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
Shebangs using different Python binary with latest Docker image in 3.10 #967
Comments
The shebang is set/determined by the runtime Interestingly both Docker images are running |
@edmorley I wonder if this change in behavior could be coming from the switch to ensurepip |
This will presumably be a side-effect of #955. The prior Both shebang lines are technically valid, though I personally feel the new more precise shebang line is generally safer and more appropriate, since it will avoid problems in environments where there are multiple Python versions installed.
So I just installed
If so, I would add additional symlinks for the other python command name variants too (eg (Though in general, I suspect that trying to copy files from a Debian image to an Ubuntu image is always going to be a bit fragile, and require lots of fixups.) |
Oh for sure, I don't disagree there. Just felt like an unintended change that, for us at least, has had some knock on consequences. One was The other was our Helm chart. We had a couple of probes that were doing Either way, if you feel this is fine/valid that's ok, I just wanted to surface it. |
Ah that makes sense - thank you for raising it. It wasn't a side-effect I'd spotted before (and even if I had, I probably wouldn't have imagined those impacts), so it's good to know about. If we wanted to switch the shebangs back in the image, we could disable ensurepip during the build again, but instead of switching back to Though as mentioned above, I tend to think the more precise shebangs are probably best longer term. For anyone affected, a quick way to switch back to the old shebangs as a short-term workaround, is by invoking pip via
|
Hi there,
We use Python 3.10 for our application Docker images. Our build process utilizes the
python:3.10
Docker image to do apip3 install
, and then we copy all the dependencies over into our main Docker image in a multi-stage build. The main Docker image in question is Ubuntu Jammy based and also has Python 3.10.We install various Python packages in our Docker image. One for example is
pylint
. Before today, the shebang for/usr/local/bin/pylint
was#!/usr/local/bin/python
. Today, this is now#!/usr/local/bin/python3.10
. Said file does not exist.I believe this is related to the latest Docker image release: https://hub.docker.com/layers/library/python/3.10/images/sha256-88cf7f1097c7a1afcf157272fd5b82709a97a68bbc4ad97a5a3119af7f2fe58b?context=explore
I'm not sure what has caused this change, likely a
pip
update or something? But I wanted to report it in the event it's a bug.Thanks
The text was updated successfully, but these errors were encountered: