Docker操作及防火牆設定

2021-10-07 20:44:23 字數 408 閱讀 6667

docker設定開機啟動

systemctl enable docker

容器跟隨docker啟動啟動

docker update --restart=always 容器id

docker inspect 容器id 檢視docker 網路資訊

防火牆設定

檢視開放的埠:firewall-cmd --list-ports

開啟防火牆埠:firewall-cmd --zone=public --add-port=80/tcp --permanent

關閉防火牆埠:firewall-cmd --zone=public --remove-port=80/tcp --permanent

防火牆設定

目錄導航 一 iptables防火牆 二 firewall防火牆 centos7 的防火牆配置跟以前版本有很大區別,centos7這個版本的防火牆預設使用的是firewall,與之前的版本centos 6.x使用iptables不一樣 目錄導航 一 iptables防火牆 1 基本操作 servic...

防火牆設定

防火牆設定 firewall cmd zone public add port 80 tcp permanent 新增埠 firewall cmd zone public query port 80 tcp 查詢80埠是否開啟 firewall cmd zone public list ports ...

docker防火牆基本操作

一 檢視系統防火牆狀態 如果返回 running 代表防火牆啟動正常 firewall cmd state 二 開啟埠外網訪問 1 新增埠 返回 success 代表成功 permanent永久生效,沒有此引數重啟後失效 firewall cmd zone public add port 80 tc...