Ask Your Question

puppet gem install error from docker container

asked 2015-11-19 13:19:52 -0600

drm509 gravatar image

updated 2015-11-19 13:21:42 -0600

I have a dockerfile where I specify to install r10k.

/opt/puppetlabs/puppet/bin/gem install r10k

Then I build the dockerfile and all works well. But, if I don't install these through the Dockerfile, but instead login/run the docker container with flags -it and run these install commands they time out. This is one of the errors I get:

[root@1d98e8a3348b /]# /opt/puppetlabs/puppet/bin/gem install r10k
ERROR:  Could not find a valid gem 'r10k' (>= 0), here is why:
          Unable to download data from - Errno::ETIMEDOUT: Connection timed out - connect(2) for "" port 443 (

The container is run with:

docker run -it --entrypoint=/bin/bash mypuppettest:1.0

Does anyone know what is going on? I'm greatly confused.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-21 12:03:40 -0600

Cristian Falcas gravatar image

Your docker container doesn't have access to internet.

You probably deleted the iptables rules created by the docker service.

In order to fix it, restart the docker service.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-19 13:19:52 -0600

Seen: 129 times

Last updated: Nov 21 '15