Docker笔记
安装docker(Centos7):
yum update yum install docker
启动/关闭服务:
# 启动
service docker start
# 或
systemctl start docker
# 关闭
service docker stop
# 或
systemctl stop docker
其他命令:
# 格式 systemctl 动作 服务名.service
# 常见命令
systemctl start docker #启动
systemctl restart docker #重启
systemctl stop docker #停止 systemctl status docker #查看状态 systemctl enable docker #自启动 systemctl disable docker #禁止自启动
防火墙:
systemctl start firewall.service