docker 单容器管理 常用命令

 登入容器的bash

docker exec -it 容器名  /bash/bin

--restart=always  随着docker启动而启动

--dns xx.xxx.xxx.xx

--add-host hostname:IP 在Hosts文件修改IP  域名

--rm  容器停止时,自动删除(此时docker ps -a)看不见

原文地址:https://www.cnblogs.com/eason-d/p/11720449.html