From d622d83fbe0f700a7ce73dd5142f39428161bebb Mon Sep 17 00:00:00 2001 From: Roald Storm <RmStorm@users.noreply.github.com> Date: Mon, 5 Aug 2019 14:54:20 +0200 Subject: [PATCH] docs: update docker registry authentication docs (#4228) --- website/docs/docker.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/website/docs/docker.md b/website/docs/docker.md index 45d1939bb6..0572bd6d36 100644 --- a/website/docs/docker.md +++ b/website/docs/docker.md @@ -93,7 +93,7 @@ Add `"default:automergeDigest"` to your `extends` array. Also add `"default:auto ##### Registry authentication -If you are running your own Renovate bot, add this to your `config.js`: +Here is an example of configuring a default Docker username/password in `config.js`: ```js module.exports = { @@ -108,3 +108,26 @@ module.exports = { ``` Alternatively, configure `DOCKER_USERNAME` and `DOCKER_PASSWORD` in env to achieve the same. + +The above two approaches create an identical host rule in renovatebot. It is possible to add additional host rules following the [documentation](https://renovatebot.com/docs/configuration-options/#hostrules) + +For example if you have some images you host yourself and some images you pull from docker hub without logging in you can configure that like this: + +```js +module.exports = { + hostRules: [ + { + hostType: 'docker', + hostName: 'index.docker.io', + username: '', + password: '', + }, + { + hostType: 'docker', + hostName: 'your.host.io', + username: '<your-username>', + password: '<your-password>', + }, + ], +}; +``` -- GitLab