From a7f1b74dd812fbc86beefea6fcd3ba4c4abaa7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChnle?= Date: Fri, 14 Feb 2014 14:23:10 +0100 Subject: [PATCH 1/5] Env Clarification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarified that the env variables here are an example output of env. The user should not set them to the example values. Docker-DCO-1.1-Signed-off-by: Matthias Kühnle (github: float64) --- docs/sources/examples/running_redis_service.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst index 9687f0cfa8..a07250c35a 100644 --- a/docs/sources/examples/running_redis_service.rst +++ b/docs/sources/examples/running_redis_service.rst @@ -68,13 +68,14 @@ Once inside our freshly created container we need to install Redis to get the service redis-server stop Now we can test the connection. Firstly, let's look at the available environmental -variables in our web application container. We can use these to get the IP and port +variables in our web application container that docker has setup for us. We can use these to get the IP and port of our ``redis`` container. .. code-block:: bash - env - . . . + env | grep DB_ + + # Should return something similar to this with your values DB_NAME=/violet_wolf/db DB_PORT_6379_TCP_PORT=6379 DB_PORT=tcp://172.17.0.33:6379 From 8a3cb0c65e7940e928e31d6e64cce5d81d9975a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChnle?= Date: Fri, 14 Feb 2014 14:29:09 +0100 Subject: [PATCH 2/5] Fixed misspelling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker-DCO-1.1-Signed-off-by: Matthias Kühnle (github: float64) --- docs/sources/examples/running_redis_service.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst index a07250c35a..c679547b7d 100644 --- a/docs/sources/examples/running_redis_service.rst +++ b/docs/sources/examples/running_redis_service.rst @@ -68,7 +68,7 @@ Once inside our freshly created container we need to install Redis to get the service redis-server stop Now we can test the connection. Firstly, let's look at the available environmental -variables in our web application container that docker has setup for us. We can use these to get the IP and port +variables in our web application container that Docker has setup for us. We can use these to get the IP and port of our ``redis`` container. .. code-block:: bash From d73d3b03e4216bf6cf44b393108dd520acac9670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChnle?= Date: Tue, 18 Feb 2014 12:36:14 +0100 Subject: [PATCH 3/5] Reworded description of the environment variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the "test now..." b/c the code example is only about inspection of env-variables. Test follows in the next section. Docker-DCO-1.1-Signed-off-by: Matthias Kühnle (github: float64) --- docs/sources/examples/running_redis_service.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst index c679547b7d..3b2f65c128 100644 --- a/docs/sources/examples/running_redis_service.rst +++ b/docs/sources/examples/running_redis_service.rst @@ -67,9 +67,8 @@ Once inside our freshly created container we need to install Redis to get the apt-get -y install redis-server service redis-server stop -Now we can test the connection. Firstly, let's look at the available environmental -variables in our web application container that Docker has setup for us. We can use these to get the IP and port -of our ``redis`` container. +Docker sets some environment variables in our web application container. +Let's inspect them with the ``env`` command. .. code-block:: bash From c1dfc63845cdf08d7609e1890f45d01f10326bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChnle?= Date: Tue, 18 Feb 2014 12:47:44 +0100 Subject: [PATCH 4/5] Updated environment description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .. to make it even more clear that this env variables are there because of the --link option. Docker-DCO-1.1-Signed-off-by: Matthias Kühnle (github: float64) --- docs/sources/examples/running_redis_service.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst index 3b2f65c128..7cbc58b58a 100644 --- a/docs/sources/examples/running_redis_service.rst +++ b/docs/sources/examples/running_redis_service.rst @@ -67,7 +67,8 @@ Once inside our freshly created container we need to install Redis to get the apt-get -y install redis-server service redis-server stop -Docker sets some environment variables in our web application container. +Since we used the ``--link redis:db`` option before. Docker has created some +environment variables in our web application container. Let's inspect them with the ``env`` command. .. code-block:: bash From 311cb5ca45c15c32408d54194470536e73ae016d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BChnle?= Date: Tue, 18 Feb 2014 16:00:21 +0100 Subject: [PATCH 5/5] Reword - one sentence :-) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker-DCO-1.1-Signed-off-by: Matthias Kühnle (github: float64) --- docs/sources/examples/running_redis_service.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/sources/examples/running_redis_service.rst b/docs/sources/examples/running_redis_service.rst index 7cbc58b58a..c9424867a4 100644 --- a/docs/sources/examples/running_redis_service.rst +++ b/docs/sources/examples/running_redis_service.rst @@ -67,9 +67,8 @@ Once inside our freshly created container we need to install Redis to get the apt-get -y install redis-server service redis-server stop -Since we used the ``--link redis:db`` option before. Docker has created some -environment variables in our web application container. -Let's inspect them with the ``env`` command. +As we've used the ``--link redis:db`` option, Docker has created some environment +variables in our web application container. .. code-block:: bash