fix(docker-exec-via-sock.sh): 优化容器执行命令的日志输出

This commit is contained in:
严浩
2025-09-23 11:15:17 +08:00
parent 0576b4862f
commit acd76aaca9

View File

@@ -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