【发布时间】:2016-05-31 13:53:30
【问题描述】:
在使用 rhel7.2 映像在 docker 内运行 iptables 时,它工作正常。
但是当我尝试运行带有一些规则的 docker 时,它根本没有启动。
这是我的 docker 文件
#######Simplest Docker file which I used for building image and it works from marathon if you dont give cmd or args ########
FROM registry.access.redhat.com/rhel7.2
ADD rhel7.2.repo /etc/yum.repos.d/rhel7.2.repo
RUN yum -y update
RUN yum install iptables -y
CMD ["/usr/sbin/init"]
######### Dockerfile END ####
###to run the docker
sudo docker run -it /bin/bash -c "iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -m statistic --mode nth --every 2 --packet 0 -j DNAT --to-destination 172.31.254.1:10004"
请告诉我怎么了?
【问题讨论】: