我有docker镜像(来自私有原子存储库),我在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上的存储库中拉出这个镜像并运行它时,容器正在与我的应用程序一起运行,但是端口没有响应。
这是相同的图像!运行的语法也是相同的。我不知道出了什么问题?
其他图片都没问题,只有这张图片有问题。
发布于 2017-09-09 01:05:06
我相信我现在可以看到问题所在了。You sestatus
显示Current mode: enforcing
。这意味着它处于严格模式,将只允许允许的连接。
编辑/etc/selinux/config
文件并将模式更改为permissive
/etc/selinux/config
# 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机器,一切都应该开始工作了
https://stackoverflow.com/questions/46105703
复制相似问题