containers / containers/podman-compose

podman-compose does not propagate build exit codes

Open
#1,061 0 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

podman-compose does not propagate exit statuses from podman build

**To Reproduce**

```
FROM docker.io/alpine:latest
RUN exit 1
```
```
services:
minimal:
build:
context: .
```
**Output**
```
$ podman build .
STEP 1/2: FROM docker.io/alpine:latest
STEP 2/2: RUN exit 5
Error: building at STEP "RUN exit 5": while running runtime: exit status 5

$echo $?
5
```

```
$ podman-compose build
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.3
podman build -f ./Dockerfile -t podman_minimal .
STEP 1/2: FROM docker.io/alpine:latest
STEP 2/2: RUN exit 5
Error: building at STEP "RUN exit 5": while running runtime: exit status 5
exit code: 5

$ echo $?
0
```

**Expected behavior**
podman-compose should propagate the exit status from the failing build setp, or at a bare minimum return a non-zero code for failed build.

**Actual behavior**
Always return status 0.

**Version**

```
$ podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.3
podman-compose version 1.0.6
podman --version
podman version 4.9.3
exit code: 0
```

**Environment:**
- OS: WSL

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.