目前我有一个使用以下代码创建的容器
docker run --detach --name gitlab_app --restart=always --publish 192.168.0.200:80:80 --publish 192.168.0.200:22:22 --volumes-from gitlab_data gitlab_image
我希望从镜像中删除端口绑定80
和22
,请问是否可以从现有的Docker容器中删除端口绑定?
NB:为了删除绑定,将容器下线是可行的。
目前我有一个使用以下代码创建的容器
docker run --detach --name gitlab_app --restart=always --publish 192.168.0.200:80:80 --publish 192.168.0.200:22:22 --volumes-from gitlab_data gitlab_image
我希望从镜像中删除端口绑定80
和22
,请问是否可以从现有的Docker容器中删除端口绑定?
NB:为了删除绑定,将容器下线是可行的。
# Will list the rules
iptables -L
# Will delete the rule you want to remove
iptables --delete [chain] <Rule definition>