From 5043bdbc93c0b9f25759810e9c9b63015efa3113 Mon Sep 17 00:00:00 2001 From: Mary Anthony Date: Mon, 27 Apr 2015 15:49:19 -0700 Subject: [PATCH] Updating env var documentation The position was a bit too early. Fleshed out the example. Also, using the _ underscore for emphasis was confusing because it is also used to indicate a level change. Signed-off-by: Mary Anthony --- docs/configuration.md | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index ae1715742..385943699 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -9,18 +9,6 @@ You configure a registry server using a YAML file. This page explains the configuration options and the values they can take. You'll also find examples of middleware and development environment configurations. -## Overriding configuration options -Environment variables may be used to override configuration parameters other than -version. To override a configuration option, create an environment variable named -REGISTRY\_variable_ where *variable* is the name of the configuration option. - -e.g -``` -REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/tmp/registry/test -``` - -will set the storage root directory to `/tmp/registry/test` - ## List of configuration options This section lists all the registry configuration options. Some options in @@ -134,6 +122,34 @@ options marked as **required**. This indicates that you can omit the parent with all its children. However, if the parent is included, you must also include all the children marked **required**. +## Override configuration options + +You can use environment variables to override most configuration parameters. The +exception is the `version` variable which cannot be overridden. You can set +environment variables on the command line using the `-e` flag on `docker run` or +from within a Dockerfile using the `ENV` instruction. + +To override a configuration option, create an environment variable named +`REGISTRY\variable_` where *`variable`* is the name of the configuration option +and the `_` (underscore) represents indention levels. For example, you can +configure the `rootdirectory` of the `filesystem` storage backend: + +``` +storage: + filesystem: + rootdirectory: /tmp/registry +``` + +To override this value, set an environment variable like this: + +``` +REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/tmp/registry/test +``` + +This variable overrides the `/tmp/registry` value to the `/tmp/registry/test` +directory. + + ## version ```yaml