fix(docker-exec-via-sock.sh): 优化容器执行命令的日志输出
This commit is contained in:
@@ -192,7 +192,7 @@ fi
|
|||||||
docker_api_base="http://localhost/${DOCKER_API_VERSION}"
|
docker_api_base="http://localhost/${DOCKER_API_VERSION}"
|
||||||
exec_create_endpoint="${docker_api_base}/containers/${CONTAINER_NAME}/exec"
|
exec_create_endpoint="${docker_api_base}/containers/${CONTAINER_NAME}/exec"
|
||||||
|
|
||||||
log "executing command in container $CONTAINER_NAME"
|
log "executing command in container '$CONTAINER_NAME': $CMD_TO_EXEC"
|
||||||
|
|
||||||
if ! exec_id=$(docker_exec_create "command" "$CMD_TO_EXEC"); then
|
if ! exec_id=$(docker_exec_create "command" "$CMD_TO_EXEC"); then
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user