Ask Your Question
0

puppet gem install error from docker container

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

drm509 gravatar image

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

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 https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/latest_specs.4.8.gz)

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
1

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

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

Stats

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

Seen: 91 times

Last updated: Nov 21 '15