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

podman-remote: run --entrypoint: extra /bin/sh somewhere #7115

Closed
edsantiago opened this issue Jul 28, 2020 · 1 comment · Fixed by #7256
Closed

podman-remote: run --entrypoint: extra /bin/sh somewhere #7115

edsantiago opened this issue Jul 28, 2020 · 1 comment · Fixed by #7256
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote

Comments

@edsantiago
Copy link
Member

In window 1:

$ ./bin/podman system service --timeout=0

Window 2:

$ ./bin/podman-remote run --entrypoint='["/bin/echo"]' alpine
/bin/sh     <---- expected: empty line

This is a problem because it's getting passed to all entrypoint commands:

$ ./bin/podman-remote run --entrypoint='["/bin/date"]' alpine
date: invalid date '/bin/sh'

master @ 288ebec, root & rootless

@mheon mheon added kind/bug Categorizes issue or PR as related to a bug. remote Problem is in podman-remote labels Jul 28, 2020
@mheon mheon self-assigned this Aug 7, 2020
@mheon
Copy link
Member

mheon commented Aug 7, 2020

The Alpine image does not specify ENTRYPOINT - instead it specified a CMD (/bin/sh). We were appending the image's CMD to the manually-specified ENTRYPOINT, but it looks like this is incorrect - we should only add image CMD if the user did not specify an entrypoint.

mheon added a commit to mheon/libpod that referenced this issue Aug 10, 2020
This matches Docker behavior, and seems to make sense - the CMD
may have been specific to the original entrypoint and probably
does not make sense if it was changed.

While we're in here, greatly simplify the logic for populating
the SpecGen's Command. We create the full command when making the
OCI spec, so the client should not be doing any more than setting
it to the Command the user passed in, and completely ignoring
ENTRYPOINT.

Fixes containers#7115

Signed-off-by: Matthew Heon <[email protected]>
mheon added a commit to mheon/libpod that referenced this issue Aug 17, 2020
This matches Docker behavior, and seems to make sense - the CMD
may have been specific to the original entrypoint and probably
does not make sense if it was changed.

While we're in here, greatly simplify the logic for populating
the SpecGen's Command. We create the full command when making the
OCI spec, so the client should not be doing any more than setting
it to the Command the user passed in, and completely ignoring
ENTRYPOINT.

Fixes containers#7115

Signed-off-by: Matthew Heon <[email protected]>
mheon added a commit to mheon/libpod that referenced this issue Aug 20, 2020
This matches Docker behavior, and seems to make sense - the CMD
may have been specific to the original entrypoint and probably
does not make sense if it was changed.

While we're in here, greatly simplify the logic for populating
the SpecGen's Command. We create the full command when making the
OCI spec, so the client should not be doing any more than setting
it to the Command the user passed in, and completely ignoring
ENTRYPOINT.

Fixes containers#7115

Signed-off-by: Matthew Heon <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants