-
Notifications
You must be signed in to change notification settings - Fork 892
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
Consider removing ENTRYPOINT
from non-distroless uv Docker images
#7030
Comments
Agreed, we can change it (just deleting that line) in the CI yaml. Since its our own images I thought we'd aim for a consistent entrypoint experience across all of them rather than retain the upstream entrypoint which would differ depending on the tag. You see that consistency often on other images derived from base images (e.g. redis, etc.). |
Ah interesting. Hm. I'm not sure — it's probably not going to be common to use |
It also applies CLI tools afaik. I do get the point though, normally by convention I expect tag variations offered by a specific project to default their entrypoint to their service/binary. If we want a different experience, we can do that as well easily. There's two core use cases here
In the first case you immediately get uv rather than something else, and it delivers a nice new user experience (no surprises from parent image). In the second case, its quite common to use multi-stage to solve if this becomes an issue. |
@zanieb For example, in the example from https://github.com/astral-sh/uv-docker-example # Reset the entrypoint, don't invoke `uv`
ENTRYPOINT []
# Run the FastAPI application by default
# Uses `fastapi dev` to enable hot-reloading when the `watch` sync occurs
# Uses `--host 0.0.0.0` to allow access from outside the container
CMD ["fastapi", "dev", "--host", "0.0.0.0", "src/uv_docker_example"] would become something like # Run the FastAPI application by default
# Uses `fastapi dev` to enable hot-reloading when the `watch` sync occurs
# Uses `--host 0.0.0.0` to allow access from outside the container
CMD ["run", "fastapi", "dev", "--host", "0.0.0.0", "src/uv_docker_example"] which showcases uv's capabilites further as you can see, but I might be biased towards uv everything 😆 |
People are weirdly against having |
I think the change in #7054 would satisfy most workflows, and addresses the original concerns and still gives us consistency. |
Using
uv
as an entrypoint is surprising (it differs from the base image) and broke the example at astral-sh/uv-docker-example#13 — I had to add:ENTRYPOINT []
cc @samypr100
The text was updated successfully, but these errors were encountered: