-
Notifications
You must be signed in to change notification settings - Fork 514
Detached mode executes entrypoint twice #1176
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
Comments
Hi @Fedma123 I don't believe this is a bug, let me explain: When you use the What you can see in the logs is When you have a container that runs a command that completes like your To demonstrate, add Build the container again with Let me know what you think! |
Hi @ninja-quokka, to investigate further, tried the following with the same files shown above. First, I tried to execute Then, I tried to run podman-compose Finally, I run As a side note, this behavior does not play nicely with init-containers: if a container is meant to run a non-idempotent command, then this behavior prevents successful startup. So, I think this should be considered a bug. |
Hi @ninja-quokka and @Fedma123 , I believe this issue is ineed a bug which is hightlighted in the code snippet as follows:
Line 2804 runs the entrypoint the first time when the podman_command is There are a few integration test cases mentioning this bug:
The fix is to create container without starting it on line 2804. This is exactly what the PR #1184 does. |
Describe the bug
podman-compose up -d
executes the container entrypoint twice.To Reproduce
Dockerfile
compose.yaml
init.sh
Expected behavior
podman logs test
should output:Actual behavior
podman logs test
outputs:Environment:
Additional context
podman compose up
behaves as expected:podman logs test
outputs:The text was updated successfully, but these errors were encountered: