Private Repository

username: username
password: password

By using the write_files directive, you can add your login credentials so that when RancherOS boots, you will already by logged in.

  • path: /home/rancher/.docker/config.json
    permissions: “0755"
    owner: rancher
    content: |
    “auths”: {”: {
    “auth”: “asdf=”,
    “email”: "

Which version should be used? Looks like documentation is currently showing 2 different ways to configure docker registry. I wasn’t able to successfully use first one with RancherOs v0.5.0.

There are actually separate use cases for both of these.

The Docker client reads from /home/rancher/.docker/config.json, so the second method will configure authentication when running docker commands.

The first command will configure authentication for system services such as those in a cloud-config or those enabled with the ros command.

1 Like

Thanks! Makes sense!