Skip to content

Configuring scale to use a private docker repository

Trevor R.H. Clarke edited this page Jun 7, 2017 · 1 revision

In order to use a private docker repository (either on docker hub or shared from gitlab or a similar index server) you will need to create login credentials for DCOS and config scale to use these. This example will assume an image repository on gitlab, the initial login stage may vary for other setups.

  1. Obtain an access token for the docker repository. In gitlab, you can go to user settings and select Personal Access Tokens.
  2. Create a new token with api access enabled. You should give this a descriptive name such as scale.
  3. Go to the gitlab project and select Registry to find the registry address. This will have instructions for logging in to the registry.
  4. docker login docker.myhost.com then type your gitlab username and paste the access token obtained earlier.
  5. When you have successfully logged in, look in ~/.docker/config.json for the login hash in the section for docker.myhost.com
  6. Create a .docker/config.json with only this entry (you can skip this step if there was only the one entry).
  7. Create a tar with this file, in the .docker directory. tar zcvf docker-credentials.tar.gz .docker
  8. Place the tar file in a directory accessible from all scale hosts (slaves and masters) or place it on a web server accessible to all scale hosts. Make sure this is a secure location as anyone with access to this file can access your repository.
  9. When you start scale in DCOS, use the Advanced Installation and set docker-credentials to the URL of the docker tar file. For example: file:///etc/scale/docker-credentials.tar.gz or https://secure-server/docker-credentials.tar.gz
Clone this wiki locally