1

I'm using following system:

[alexus@wcmisdlin02 Desktop]$ rpm -q docker
docker-1.9.1-25.el7.centos.x86_64
[alexus@wcmisdlin02 Desktop]$ cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[alexus@wcmisdlin02 Desktop]$ uname -a
Linux wcmisdlin02.uftmasterad.org 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[alexus@wcmisdlin02 Desktop]$ 

I'm referring to Compose File Reference for syntax of docker-compose.yml:

[alexus@wcmisdlin02 Desktop]$ cat docker-compose.yml 
nginx:
  container_name: nginx
  image: nginx
  ports:
    - "80:80"
[alexus@wcmisdlin02 Desktop]$ docker-compose up
Creating nginx

ERROR: for nginx  Cannot start container fcaba40fb21cc64f514d71eb8117ba0f2102482be6e74615e96261667403a236: failed to create endpoint nginx on network bridge: COMMAND_FAILED: '/sbin/iptables -w2 -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination 172.17.0.2:80 ! -i docker0' failed: iptables: No chain/target/match by that name.
Attaching to 
[alexus@wcmisdlin02 Desktop]$

If I to remove ports part out of docker-compose.yml, container starts, but obviously network is not set the way I need it too.

I need nginx container to start to listen on port 80 on host.

What am I doing wrong?

2
  • you user is in docker group?
    – c4f4t0r
    Jul 20, 2016 at 22:07
  • @c4f4t0r docker group does NOT exist on my system.
    – alexus
    Jul 20, 2016 at 22:59

2 Answers 2

2

iptables: No chain/target/match by that name.

Something on your system removed Docker's iptables rules. They can be recreated by restarting the Docker service.

3
  • I rebooted my system and that did not do anything for me(
    – alexus
    Jul 27, 2016 at 15:22
  • A full reboot may also restart whatever is removing the firewall rules. Try only restarting the Docker service.
    – BMitch
    Jul 27, 2016 at 18:56
  • I tried before, even full reboot wouldn't help... but after updating to later version problem was resolved, maybe there was a bug?
    – alexus
    Jul 27, 2016 at 18:58
0

I'm guessing there was a bug, as I tried it again and now it's working. I did update docker package to latest version:

[alexus@wcmisdlin02 ~]$ rpm -q docker
docker-1.10.3-44.el7.centos.x86_64
[alexus@wcmisdlin02 ~]$ 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .