From 7607c003cfcf66b417bd1b31e4778b41b121f950 Mon Sep 17 00:00:00 2001 From: Reed Allman Date: Thu, 3 May 2018 12:52:58 -0700 Subject: [PATCH] improve private auth docs a little (#971) --- docs/operating/private_registries.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/operating/private_registries.md b/docs/operating/private_registries.md index 1b346a681..38812cd12 100644 --- a/docs/operating/private_registries.md +++ b/docs/operating/private_registries.md @@ -3,6 +3,17 @@ For local development, or a team that wishes to keep their images off of the public Docker registry, a private registry may be useful. This can be hosted on your own server or local machine. See the Docker docs [here](https://docs.docker.com/registry/) for information on setting this up. A registry on localhost may greatly speed up iterative development in environments where the network is constrained. +To set up your fn service with authentication for any registry, you must +provide fn with `DOCKER_AUTH` env var: + +``` +DOCKER_AUTH='{"auths":{"http://my.registry.com:80":{"auth":"yourauthbase64here"}}}' +``` + +You may provide multiple auths in this way, it's also possible to run the `fn` +docker container with a volume mounted `~/docker/config.json` or use a local +version of `fn` against your locally configured `dockerd`. + This is where the `FN_REGISTRY` environment variable or `--registry` setting comes into play. ## The `FN_REGISTRY` or `--registry` setting.