Chubsdad
Chubsdad

Reputation: 25497

Docker exit code in windows batch file

I would like references on how to check the exit code from docker command like docker run, docker build etc. in a windows batch file.

Upvotes: 0

Views: 1069

Answers (1)

Zach Pedigo
Zach Pedigo

Reputation: 426

Error codes are set to ERRORLEVEL so your batch file might look like this:

IF %ERRORLEVEL% == 0 (
    do stuff
)

Upvotes: 1

Related Questions