Inside my current employer there is quite the buzz around Docker and especially Docker Datacenter being pushed as a commercial offering with Server Infrastructure. This in turn has led to a number of people deploying various Docker components in their various labs around the world, however they tend to be hitting the same issues.
I’m presuming that most of the lab environments must be an internal/secure environment as there is always a request to install without an internet connection (offline).
I did come across one person building Docker DC in one place then trying to manually copy all of the containers to the lab environment (which inevitable broke all of the certificates) essentially DON’T DO THAT.
Luckily for people wanting to deploy Docker DataCentre in an environment without an internet connection, their exists a full bundle containing all the bits that you need (UCP/DTR etc.). Simply download it on anything with an internet connection, take it to your offline machines and transfer over the bundle and run the following:
$ docker load < docker_dc_offline.tar.gz
Unfortunately, the majority of people who follow the next steps tend to be confused with what happens next:
Unable to find image 'docker/ucp:latest' locally
Pulling repository docker.io/docker/ucp
docker: Error while pulling image: Get https://index.docker.io/v1/repositories/docker/ucp/images: dial tcp: lookup index.docker.io on [::1]:53: read udp [::1]:50867->[::1]:53: read: connection refused.
The culprit behind this is the default behaviour of Docker,based upon a commit in mid-2014 specified that if no tag is specified to a docker image then it will default to the tag
:latest. So simply put the installation steps for the Docker UCP ask the use to run the image
docker/ucp with no tag and a number of passed commands. Docker immediately ignores the offline bundle images and attempts to connect to docker hub for the
:latest version, where the installation promptly fails.
To fix this, you simple need to look at the images that have been installed by the offline bundle and use the tag as part of the installation steps.
ALSO: If you see this error, then please don’t ignore it 😀
WARNING: IPv4 forwarding is disabled. Networking will not work.
$ vim /etc/sysctl.conf: net.ipv4.ip_forward = 1 ...
sysctl -p /etc/sysctl.conf