-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"podman create" prepends ENTRYPOINT to CMD #3708
Comments
The behaviour of |
I'll take this one. |
I encountered this issue too, podman will always use the entrypoint in the docker image and does not use the You can reproduce with following yaml file:
Update: Sorry, my issue was fixed here: 6f35a57 |
Hm. I might be wrong here. |
#3744 to fix |
Unfortunately, this will only catch newly-created containers - older ones will be stuck with the doubled entrypoint. |
Previously, we use CreateConfig's Command to populate container Command (which is used as CMD for Inspect and Commit). Unfortunately, CreateConfig's Command is the container's full command, including a prepend of Entrypoint - so we duplicate Entrypoint for images that include it. Maintain a separate UserCommand in CreateConfig that does not include the entrypoint, and use that instead. Fixes containers#3708 Signed-off-by: Matthew Heon <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When running
podman create
the ENTRYPOINT is prepended (hardcoded) to the CMD. If the container is committed to an image, this change is preserved, which means that the entrypoint will be run multiple times.Steps to reproduce the issue:
Please see the attached script which performs the following steps:
Start with a dummy image with an ENTRYPOINT and a CMD
podman create
a container from the imagepodman inspect
the container and observe the CMDDescribe the results you received:
The final CMD is the result of the concatenation of ENTRYPOINT + CMD.
Describe the results you expected:
The CMD should not be changed.
Additional information you deem important (e.g. issue happens only occasionally):
Note that the issue only happens with
podman create
. Buildah seems not affected (see last step in the above script).Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
Physical host (laptop) running Ubuntu 16.04.
All above commands (buildah, podman) run as root.
Buildah version:
The text was updated successfully, but these errors were encountered: