Skip to content

Fail the docker-compose command if any one of the conatiner failed #10225

@Gobi-Ganesan

Description

@Gobi-Ganesan

Description

I'm using the following docker-compose file

version: '3.4'
services:
    one:
        image: busybox
        command: 'true'

    two:
        image: busybox
        command: 'false'

    three:
        image: busybox
        command: 'true'

I want to report an error If any one of the containers failed. --exit-code-from Only works for selecting a single container.
--abort-on-container-exit will give exit code 0 if service one or three is completed first.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions