Skip to content

Exit with error codes when a docker command fails #1875

@larryweya

Description

@larryweya

I'm writing some shell scripts to help my web container find other containers it depends on. I'm doing this by first storing the cidfile when e.g. the db container starts then later when the web container starts it looks up the IP address using the cidfile.

My issue is that whenever a docker command fails e.g. when the container id isnt valid for an inspect command, docker doesn't set an error code. It would be helpful if docker commands set an error code when they fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions