puppet gem install error from docker container
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.