distribution/docs
Aaron Lehmann a49bf24abe More flexible environment variable overrides
Overriding configuration parameters with environment variables used to
work by walking the configuration structure and checking for a
corresponding environment variable for each item. This was very limiting
because only variables corresponding to items that already existed in
the configuration structure would be checked. For example, an
environment variable corresponding to nested maps would only be noticed
if the outer map's key already existed.

This commit changes environment variable overriding to iterate over the
environment instead. For environment variables beginning with the
REGISTRY_ prefix, it splits the rest of their names on "_", and
interprets that as a path to the variable to unmarshal into. Map keys
are created as necessary. If we encounter an empty interface partway
through following the path, it becomes an implicit
map[string]interface{}.

With the new unit tests added here, parser.go now has 89.2% test
coverage.

TestParseWithExtraneousEnvStorageParams was removed, because the limit
of one storage driver is no longer enforced while parsing environment
variables. Now, Storage.Type will panic if multiple drivers are
specified.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-09-03 16:11:53 -07:00
..
images Documentation enhancements 2015-08-28 12:46:53 -07:00
osx Update example config to avoid deprecated option 2015-08-17 08:25:22 +08:00
spec Documentation enhancements 2015-08-28 12:46:53 -07:00
storage-drivers Fix lack of styling on Aliyun OSS documentation page 2015-08-06 14:59:07 -07:00
apache.md Documentation enhancements 2015-08-28 12:46:53 -07:00
architecture.md Updating for Hugo 2015-06-15 14:39:33 -07:00
building.md Granmar and speeling fixes 2015-08-28 12:48:55 -07:00
configuration.md More flexible environment variable overrides 2015-09-03 16:11:53 -07:00
deploying.md Documentation enhancements 2015-08-28 12:46:53 -07:00
Dockerfile Fix relinker 2015-08-04 23:02:34 -07:00
glossary.md Updating for Hugo 2015-06-15 14:39:33 -07:00
help.md Documentation enhancements 2015-08-28 12:46:53 -07:00
index.md Documentation enhancements 2015-08-28 12:46:53 -07:00
insecure.md Documentation enhancements 2015-08-28 12:46:53 -07:00
introduction.md Documentation enhancements 2015-08-28 12:46:53 -07:00
Makefile Updating for Hugo 2015-06-15 14:39:33 -07:00
migration.md Updating for Hugo 2015-06-15 14:39:33 -07:00
mirror.md Adding mirror as a recipe 2015-08-28 12:47:39 -07:00
nginx.md Documentation enhancements 2015-08-28 12:46:53 -07:00
notifications.md Granmar and speeling fixes 2015-08-28 12:48:55 -07:00
osx-setup-guide.md Granmar and speeling fixes 2015-08-28 12:48:55 -07:00
recipes.md Granmar and speeling fixes 2015-08-28 12:48:55 -07:00
storagedrivers.md Documentation enhancements 2015-08-28 12:46:53 -07:00
test.compare.md Fix relinker 2015-08-04 23:02:34 -07:00
test.md Fix relinker 2015-08-04 23:02:34 -07:00