执行'docker stack deploy'时有没有办法获取详细的日志信息?
Is there any way to obtain detailed logging info when executing 'docker stack deploy'?
在Docker17.03,执行时
docker stack deploy -c docker-compose.yml [stack-name]
唯一输出的信息是:
Creating network <stack-name>_myprivatenet
Creating service <stack-name>_mysql
Creating service <stack-name>_app
有没有办法让 Docker 输出有关部署期间发生的事情的更多详细信息?
例如,以下信息将非常有用:
图像(即 'mysql' 图像)正在从注册表下载(并提供注册表的信息)
如果说 'app' 图像无法从其私有注册表下载,则会输出一条错误消息(即由于不正确或遗漏的凭据 - 需要注册表登录)
或许可以通过以下任一方式提供:
- docker 堆栈部署 --logs
- docker 堆栈日志
谢谢!
docker stack logs
实际上是 issue 31458
中请求的功能
request for a docker stack logs which can show the logs for a docker stack much like docker service logs
work in 1.13.
docker-compose
works similarly today, showing the interleaved logs for all containers deployed from a compose file.
This will be useful for troubleshooting any kind of errors that span across heterogeneous services.
这仍然悬而未决,因为,Drew Erny (dperny
) 详情:
there are some changes that have to be made to the API before we can pursue this, because right now we can only get the logs for 1 service at a time unless you make multiple calls (which is silly, because we can get the logs for multiple services in the same stream on swarmkit's side).
After I finish those API changes, this can be done entirely on the client side, and should be really straightforward. I don't know when the API changes will be in because I have started yet, but I can let you know as soon as I have them!
在Docker17.03,执行时
docker stack deploy -c docker-compose.yml [stack-name]
唯一输出的信息是:
Creating network <stack-name>_myprivatenet
Creating service <stack-name>_mysql
Creating service <stack-name>_app
有没有办法让 Docker 输出有关部署期间发生的事情的更多详细信息?
例如,以下信息将非常有用:
图像(即 'mysql' 图像)正在从注册表下载(并提供注册表的信息)
如果说 'app' 图像无法从其私有注册表下载,则会输出一条错误消息(即由于不正确或遗漏的凭据 - 需要注册表登录)
或许可以通过以下任一方式提供:
- docker 堆栈部署 --logs
- docker 堆栈日志
谢谢!
docker stack logs
实际上是 issue 31458
request for a docker stack logs which can show the logs for a docker stack much like
docker service logs
work in 1.13.
docker-compose
works similarly today, showing the interleaved logs for all containers deployed from a compose file.
This will be useful for troubleshooting any kind of errors that span across heterogeneous services.
这仍然悬而未决,因为,Drew Erny (dperny
) 详情:
there are some changes that have to be made to the API before we can pursue this, because right now we can only get the logs for 1 service at a time unless you make multiple calls (which is silly, because we can get the logs for multiple services in the same stream on swarmkit's side).
After I finish those API changes, this can be done entirely on the client side, and should be really straightforward. I don't know when the API changes will be in because I have started yet, but I can let you know as soon as I have them!