Docker容器(Windows10,Centos7)端口

我有Docker镜像(来自私有的primefaces库)巫婆我作为一个容器在Docker(Windows10)中运行,一切都是正确的:

docker run -d --net siecDocker --ip 172.18.0.22 --name UF -v /opt/DOCKER:/DEPLOY -p 9080:9080 -p 9043:9043 -p 9060:9060 ufek:1.0 

我在本地和远程端口9043,9060,9080的应用程序和URL地址回答没有问题。

当我从资源库中取出这个图像在centos7并运行它的容器正在运行与我的应用程序,但端口不答复。

它是相同的图像! 和运行的语法也是一样的。 我不知道什么是错的?

其他的图片都没错,只有这个是有问题的。

我相信我现在可以看到这个问题。 你sestatus显示Current mode: enforcing 。 这意味着它处于严格的模式,只允许允许的连接。

编辑/etc/selinux/config文件并将模式更改为宽容

的/ etc / selinux的/configuration

 # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=permissive # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted 

重新启动你的centos机器,事情应该开始工作