-
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 service: inconsistent exit code when called from docker #18889
Comments
Thanks for reaching out! To me it looks like a Docker bug. |
If I run the same command against a docker engine/socket, it works as expected. |
I am 99% sure that this was report before but I cannot find that issue right now (if it even exists). |
#16056 but it was closed without proper resolution so I am good with keeping this one open here. |
Thanks for clarifying, @oleastre. I agree, it looks an issue on the podman side. |
I would figure this is a race between the container being removed and the exit code being checked? I still see this as a docker daemon bug, since the client is exiting with the wrong exit code. Unless docker intends to ignore any containers exit code, if the container is a --rm? |
Let's dig a bit deeper. The |
With |
Opened #18912 |
The "removed" condition mapped to an undefined state which ultimately rendered the wait endpoint to return an incorrect exit code. Instead, map "removed" to "exited" to make sure Podman returns the expected exit code. Fixes: containers#18889 Signed-off-by: Valentin Rothberg <[email protected]>
Issue Description
I use some shared scripts between docker and podman environments. To allow some compatibility, I run podman as a service and configure docker to use the podman socket.
I noticed some strange behaviour in one script where we check for the exit code of a
run
command.In some cases, I correctly get the command exit code, in other cases, I simply get
0
.Some informations:
Steps to reproduce the issue
Steps to reproduce the issue
systemctl start --user podman.socket
export DOCKER_HOST="unix://$(podman info -f "{{.Host.RemoteSocket.Path}}")"
Describe the results you received
I would expect all commands to return
3
, but when ran throughdocker
with the--rm
flag I get0
Describe the results you expected
All variants to return the same exit code.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
No response
The text was updated successfully, but these errors were encountered: