如何显示docker当前配置? [英] How to display the docker current configuration?

查看:504
本文介绍了如何显示docker当前配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Debian 8机器上安装了docker守护进程。并且在文件 / etc / default / docker中为 DOCKER_OPTS设置了值之后,我想检查重启服务后
是否正确设置了该值。

I have installed the docker daemon on a Debian 8 machine. And after setting a value for "DOCKER_OPTS" within the file "/etc/default/docker" I wanted to check if after restarting the service the value was set properly.

是否有命令显示当前泊坞窗的配置?

Is there a command to display the current docker's configuration ?

推荐答案

经过一些研究,我发现了以下问题 https://github.com/docker/docker/issues/9889 解释了systemd忽略了配置文件 / etc / default / docker 。因此,在我的情况下,未设置 DOCKER_OPTS。

After some researches I found the following issue https://github.com/docker/docker/issues/9889 which explains that systemd ignores the configuration file /etc/default/docker. Therefore in my case "DOCKER_OPTS" is not set.

在编辑文件 /lib/systemd/system/docker.service 可以使用Adrian提到的命令 ps aux |检查设置是否正确。 grep docker

After editing the file /lib/systemd/system/docker.service it is possible to check that the value is set correctly with the command, mentioned by Adrian, ps aux | grep docker.

检查安装版本和系统信息的其他有用命令是 docker版本 docker info

The other useful commands to check the installation version and system information are docker version and docker info.

这篇关于如何显示docker当前配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆