zoukankan      html  css  js  c++  java
  • Docker修改IP地址方法

    一、查看Docker IP

    root@master:/# ifconfig docker0
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 172.17.10.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:4e:31:70:a8  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    

    二、修改IP地址 [切勿与宿主机同网段]

    vi /etc/docker/daemon.json
    

    增加以下内容()

    {
    	 "registry-mirrors": [
    		 "https://docs.docker.com"
    	  ],
    	 "bip": "172.17.10.1/16"
    }
    
    

    三、重启Docker服务

    service docker restart
    

    四、查看修改后的Docker IP

    root@master:/# ifconfig docker0
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            inet 172.17.11.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:4e:31:70:a8  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    

    (转发请注明出处:http://www.cnblogs.com/zhangyongli2011/ 如发现有错,请留言,谢谢)

  • 相关阅读:
    listview 优化
    重要博客网址
    bottombar——Fragment
    视频播放,,今日头条样式
    databinding
    Picasso
    22222222
    202004leetcode刷题记录
    批量下载邮箱中指定日期范围的附件
    有雾环境下的目标检测
  • 原文地址:https://www.cnblogs.com/zhangyongli2011/p/12981754.html
Copyright © 2011-2022 走看看