containers / containers/podman-compose
--abort-on-container-exit does not work
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
podman-compose up --abort-on-container-exit is not aborting other containers when one exits. This creates issues when running this command in a Jenkins job and it results in a failure of the job.
**To Reproduce**
Run this simple docker-compose.yml file with the --abort-on-container-exit option.
```version: "3"
services:
too_long:
image: busybox
command: ["/bin/busybox", "sh", "-c", "sleep 3600; exit 0"]
tmpfs:
- /run
- /tmp
sh1:
image: busybox
command: ["/bin/busybox", "sh", "-c", "sleep 5; exit 1"]
tmpfs:
- /run
- /tmp
sh2:
image: busybox
command: ["/bin/busybox", "sh", "-c", "sleep 10; exit 2"]
tmpfs:
- /run
- /tmp
```
**Expected behavior**
The sh2 and too_long containers should be aborted when the sh1 returns exit code 1.
**Actual behavior**
The sh2 and too_long containers keep running in the background after the sh1 exits.
**Environment:**
- OS: Linux
- podman version: 4.2.0
- podman compose version: 1.0.6
Contributor guide
Assessment
This issue has not been assessed yet.