Machine: How to configure logins for private registries?

Created on 12 Apr 2016  ·  3Comments  ·  Source: docker/machine

I haven't found a way yet to configure credentials for our private registry (as in username and password, TLS is working fine).

I expected docker-machine to copy $HOME/.dockercfg to the VMs (like it copies certificates).

Am I missing something or are login credentials for private registries not supported?

Most helpful comment

We want to use Gitlab's new autoscale feature for continuous integration, which uses docker-machine to launch instances on demand. The gitlab-ci runner doesn't provide an opportunity to provision VMs.

Currently I don't see an alternative to building custom images for each cloud provider we want to try, which is annoying and time consuming at best and a security risk at worst.

docker-machine is already copying TLS certificates, so I'd argue it should do the same with the login credentials.

All 3 comments

They're supported but it's always read from the computer where the Docker client is invoked AFAIK. So, if you want to pull private images, you need to docker pull from the same computer (client) where you have already docker logined.

If desired, you could docker-machine scp the .dockercfg file to your created instances.

We want to use Gitlab's new autoscale feature for continuous integration, which uses docker-machine to launch instances on demand. The gitlab-ci runner doesn't provide an opportunity to provision VMs.

Currently I don't see an alternative to building custom images for each cloud provider we want to try, which is annoying and time consuming at best and a security risk at worst.

docker-machine is already copying TLS certificates, so I'd argue it should do the same with the login credentials.

Was this page helpful?
0 / 5 - 0 ratings