docker run –name t1 -it -p 80 –rm l/httpd:v1 (进去后开启httpd,其中-p80是要求转换这个端口,转换哪个需要inspect查看或者docker port 容器名)
docker run –name t1 -it -p 81:80 –rm l/httpd:v1(对外开放端口指定到81)
/etc/docker/daemon.json中改默认网桥信息
{
“加速器地址”,
“bip”:”10.0.0.0/16″,
“fixed-cidr”:”10.0.0.0/16″,
“fixed-cidr-v6″:”2001:::2”,
“mtu”:”1500″,
“default-gateway”:”10.0.254.254″,
“default-gateway-v6″:”2001:::1”,
“dns”:[“1.1.1.1″,”2.2.2.2”],
}
原文链接:https://www.cnblogs.com/Leaders543/p/12119144.html
原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/17755