-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
suggestion: remove ENTRYPOINT from distroless images [8.0] #4650
Comments
This was the issue that prompted this change and explains the reasoning: #3866 |
There is no real use-case mentioned in that issue. These images are meant to be used as base images, and setting an The suggestion is to change: ENTRYPOINT ["/usr/bin/dotnet"]
CMD ["--info"] to CMD ["/usr/bin/dotnet", "--info"] Then What do you think? |
What is the use case for using |
For derived images with framework-dependent apps, would it not be easier for those developers to just specify: CMD ["/app/MyApp.dll"] without having to understand where the .NET runtime is installed? |
An I'm adding support to the sdk tooling to work well with Red Hat base images (dotnet/sdk-container-builds#397) which use this pattern. Currently, the thinking is we can make the tooling emit a While trying some things I noticed the distroless images have an I don't think we gain something with this
That doesn't work the same accross distroless and regular images. It also doesn't work when invoking the app through the apphost. |
My view is that using Note that the reason for #3866 was not intended to be a convenience to users that would allow them to use |
I understand what you recommend. Can you explain why ENTRYPOINT ["/usr/bin/dotnet"]
CMD ["--info"] is preferable to CMD ["/usr/bin/dotnet", "--info"] ? If there is no reason, |
|
I don't find this intuitive, or self-documenting. This following message means: "bash is not found".
Except for the 7.0 Mariner image, this seems to be new for 8.0. The main reason is to make |
But why are you using
Why do you want to use |
The use-case that triggered me is to use a helper script That made me look if some This I don't see the advantage it gives. |
It doesn't get in the way if you use |
It would be nice if the base image wasn't opinionated and would allow both It seems you disagree, so I'll close this suggestion. |
Distroless images set :
dotnet-docker/src/runtime/8.0/jammy-chiseled/amd64/Dockerfile
Lines 28 to 29 in 948b5fd
and non-distroless images do not.
If you switch
base
for the aboveDockerfile
from a regular to a distroless, the distroless application image won't work because theENTRYPOINT
is pre-pended to the command. It tries to execute:/usr/bin/dotnet /usr/bin/dotnet assembly.dll
.@mthalman what do you think about removing the
ENTRYPOINT
from the distroless images? Is there a strong reason to set this?If desired,
CMD
can still be set toCMD ["/usr/bin/dotnet", "--info" ]
.This also applies the Ubuntu Chiseled images: https://github.com/ubuntu-rocks/dotnet.
I noticed the difference while working on: dotnet/sdk-container-builds#398.
cc @baronfel
The text was updated successfully, but these errors were encountered: