doc on how to install docker 51/22251/1
authorseshukm <seshu.kumar.m@huawei.com>
Mon, 6 Nov 2017 06:28:51 +0000 (11:58 +0530)
committerseshukm <seshu.kumar.m@huawei.com>
Mon, 6 Nov 2017 06:28:51 +0000 (11:58 +0530)
IssueId: SO-300

Change-Id: I03351070ac519f68f51695f60bd279c73b7f5696
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
docs/Install_Docker.rst [new file with mode: 0644]

diff --git a/docs/Install_Docker.rst b/docs/Install_Docker.rst
new file mode 100644 (file)
index 0000000..5712691
--- /dev/null
@@ -0,0 +1,85 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright 2017 Huawei Technologies Co., Ltd.\r
+\r
+Install Docker\r
+===============\r
+\r
+Make sure curl is installed on the Ubuntu VM:\r
+\r
+.. code-block:: bash\r
+\r
+       sudo apt update\r
+       sudo apt install curl\r
+\r
+If you are behind a corporate firewall (replace "proxyhost:port" with your actual proxy information)\r
+       https_proxy="https://*proxyhost:port*" curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -\r
+       \r
+Otherwise:\r
+       curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -\r
+Expected Response:\r
+       OK\r
+Add the docker package repository:\r
+       sudo apt-add-repository "deb https://apt.dockerproject.org/repo ubuntu-xenial main"\r
+       \r
+Install packages:\r
+\r
+.. code-block:: bash\r
+\r
+    sudo apt update\r
+    sudo apt-cache policy docker-engine\r
+       sudo apt install docker-engine\r
+       sudo apt install docker-compose\r
+       \r
+If you are behind a corporate firewall, you will need to configure proxy settings for docker so that images may be obtained from internet repositories.  In the commands shown here, replace *"proxyhost:port"*, *"yourdomain1.com"*, and *"yourdomain2.com"* with appropriate values.\r
+       \r
+    Make the docker configuration directory:\r
+\r
+.. code-block:: bash\r
+       \r
+        sudo mkdir -p /etc/systemd/system/docker.service.d\r
+       \r
+    Edit (create) this file:\r
+\r
+.. code-block:: bash\r
+       \r
+               sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf\r
+       \r
+    Add these lines:\r
+\r
+        [Service]\r
+        \r
+               Environment="HTTP_PROXY=https://*proxyhost:port*"\r
+        \r
+               Environment="HTTPS_PROXY=https://*proxyhost:port*"\r
+        \r
+               Environment="NO_PROXY=localhost,127.0.0.1,.yourdomain1.com,.yourdomain2.com"\r
+       \r
+    Restart docker:\r
+\r
+.. code-block:: bash\r
+       \r
+        sudo systemctl daemon-reload\r
+        sudo systemctl restart docker\r
+\r
+Add yourself to the docker user group (replace "userid" with your user ID):\r
+\r
+.. code-block:: bash\r
+\r
+    sudo usermod -a -G docker *userid*\r
+\r
+Log out and log back in so that the user group change will takeeffect.\r
+\r
+Verify that you can connect to docker as yourself (i.e. not as root):\r
+\r
+.. code-block:: bash\r
+\r
+    docker ps\r
+\r
+Verify that you can download and run the hello-world container\r
+\r
+.. code-block:: bash\r
+\r
+    docker run hello-world\r
+       \r
+.. image:: images/Docker_install_1.png
\ No newline at end of file