title: How does Spring map Docker environment variables?
body: <p>So I found <a href="https://github.com/jonashackt/cxf-spring-cloud-netflix-docker/tree/4a8f578c2900fed1ef8952c9dba7c8e81aa621a7" rel="nofollow noreferrer">this sample project</a>. In <a href="https://github.com/jonashackt/cxf-spring-cloud-netflix-docker/blob/4a8f578c2900fed1ef8952c9dba7c8e81aa621a7/docker-compose.yml" rel="nofollow noreferrer">docker-compose.yml</a> I notice that he is supplying a environment variable called <code>REGISTRY_HOST</code>, and that this is then used in various <code>application.yml</code> files in the project, <a href="https://github.com/jonashackt/cxf-spring-cloud-netflix-docker/blob/6a26654034b289ea8593422e274399e30bfdd60c/weatherbackend/src/main/resources/application.yml" rel="nofollow noreferrer">here for instance</a>.</p>
  
  <p>What I am wondering is, how does this mapping work and is it Docker or Spring that performs the magic? For instance, he is binding <code>registry.host</code> and <code>registry.port</code>, but how exactly is this mapped? How come it is <code>registry</code> that is the prefix, and where does <code>registry.host</code> come from when it isn't in the compose file?</p>