【发布时间】:2019-03-15 15:42:56
【问题描述】:
我想了解如何在 Windows 批处理文件中检查 docker 命令(如 docker run、docker build 等)的退出代码。
【问题讨论】:
-
if %errorlevel% NEQ 0 (echo Something error happened and the above command returned exit code not equal to 0: %errorlevel%) else (Success^^! Exit code is %errorlevel%)只是一个例子。
标签: docker batch-file