首页 > 其他 > 详细

Docker容器的特权模式介绍

时间:2020-01-30 13:28:46      阅读:624      评论:0      收藏:0      [点我收藏+]
  • 启动一个普通的容器
    • docker run -itd --name centos centos:7
  • 安装网络工具
    • yum install -y net-tools
  • 执行route -n
  • 删除网关
    • route del default gw 172.17.0.2
    • 删除失败:SIOCDELRT: Operation not permitted
  • 启动拥有特权模式的容器
    • docker run -itd --privileged=true --name mycentos1 centos:7
  • 进入容器
    • docker exec -it 容器id /bin/bash
  • 删除网关
    • route del default gw 172.17.0.2
    • 删除成功

备注:特权模式使用较少

Docker容器的特权模式介绍

原文:https://www.cnblogs.com/weisunblog/p/12242466.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!