为Docker守护程序分配标签

weixin_38093910 2019-09-12 12:41:03
如何为Ubuntu上已经运行的Docker守护程序分配标签? 尝试: export DOCKER_OPTS="--label=com.example.storage=ssd" sudo restart docker 但没有帮助. docker info需要显示标签.
...全文
15 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38105839 2019-09-12
  • 打赏
  • 举报
回复
docker configuration section很清楚: Log into your host as a user with sudo or root privileges. If you don’t have one, create the /etc/default/docker file on your host. Depending on how you installed Docker, you may already have this file. Open the file with your favorite editor. $sudo vi /etc/default/docker Add a DOCKER_OPTS variable with the following options. These options are appended to the docker daemon’s run command. DOCKER_OPTS="--label=com.example.storage=ssd" Save and close the file. Restart the docker daemon. $sudo restart docker

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧