Skip to content
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

crane mutate deletes Cmd if you try to override the --entrypoint without --cmd #2041

Open
cormacrelf opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@cormacrelf
Copy link

Describe the bug

Given a base image with Entrypoint + Cmd;

crane mutate --entrypoint ... without also specifying --cmd deletes the Cmd. You end up with an Entrypoint only.

To Reproduce

As above

Expected behavior

Expected it to preserve the original Cmd, and override the Entrypoint only.

Deleting Cmd is unexpected, Dockerfile syntax ENTRYPOINT [...] does not do that. Ultimately to use crane mutate, you have to look up the base image, get .Config.Cmd, and re-add it as --cmd if you are using --entrypoint alone. This is possible! But not expected behaviour

Additional context

Add any other context about the problem here.

  • Output of crane version: 0.19.1, but there are no relevant commits since then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant