Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2895,"date":"2019-12-27T07:04:11","date_gmt":"2019-12-27T07:04:11","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2895"},"modified":"2019-12-27T07:04:11","modified_gmt":"2019-12-27T07:04:11","slug":"installing-docker-ce-on-debian-9","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/installing-docker-ce-on-debian-9\/","title":{"rendered":"Installing Docker CE on Debian 9"},"content":{"rendered":"

Introduction<\/h3>\n

Docker is an application that allows for deployment of software within virtual containers. It was written in the Go programming language. In this tutorial, you’ll learn how to install Docker CE on Debian 9.<\/p>\n

Docker CE is the “Community Edition”, which is suitable for developers and small teams.<\/p>\n

Create a new AKLWEB Host VPS<\/h3>\n

1GB of RAM is the minimum requirement, though I recommend using at least 2GB of RAM.<\/p>\n

Setup and Installation<\/h3>\n

Connect to your server using SSH via the Terminal on Mac or PuTTY on Windows.<\/p>\n

ssh root@203.1.113.1\r\n<\/code><\/pre>\n

Replace “203.1.113.1<\/code>” with your server IP.<\/p>\n

You will be prompted to type “Yes<\/code>” or “No<\/code>” to add the server’s RSA fingerprint to your list of known hosts. Type “Yes<\/code>” and hit “Enter<\/code>“.<\/p>\n

Now you are connected as\u00a0root<\/code>, so you don’t need to use\u00a0sudo<\/code>. If you connect as a user you will need\u00a0sudo<\/code>\u00a0to perform most of the actions.<\/p>\n

On a fresh machine, as root, update\u00a0apt<\/code>.<\/p>\n

apt-get update\r\n<\/code><\/pre>\n

Install packages to allow apt to use a repository over\u00a0HTTPS<\/code>.<\/p>\n

apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y\r\n<\/code><\/pre>\n

Add Docker\u2019s official GPG key.<\/p>\n

curl -fsSL https:\/\/download.docker.com\/linux\/$(. \/etc\/os-release; echo \"$ID\")\/gpg | sudo apt-key add -\r\n<\/code><\/pre>\n

Verify that key fingerprint is equal to:\u00a09DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88<\/code>.<\/p>\n

apt-key fingerprint 0EBFCD88\r\n<\/code><\/pre>\n

Use the following command to set up the stable repository.<\/p>\n

add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/$(. \/etc\/os-release; echo \"$ID\") $(lsb_release -cs) stable\"\r\n<\/code><\/pre>\n

Update\u00a0apt<\/code>\u00a0again.<\/p>\n

apt-get update\r\n<\/code><\/pre>\n

Install Docker.<\/p>\n

apt-get install docker-ce -y\r\n<\/code><\/pre>\n

Create a user<\/h3>\n

If you don’t want to run Docker as the root user, create a non-root user.<\/p>\n

adduser foo\r\n<\/code><\/pre>\n

Then, add this user to the Docker group.<\/p>\n

usermod -aG docker foo\r\n<\/code><\/pre>\n

Now restart the Docker service.<\/p>\n

service docker restart\r\n<\/code><\/pre>\n

Verify that Docker CE is installed correctly by running the\u00a0hello-world<\/code>\u00a0image.<\/p>\n

docker run hello-world\r\n<\/code><\/pre>\n

This command downloads a test image and runs it in a container. When the container runs, it prints a message like this one and exits.<\/p>\n

Unable to find image 'hello-world:latest' locally\r\nlatest: Pulling from library\/hello-world\r\n9a0669468bf7: Pull complete \r\nDigest: sha256:cf2f6d004a59f7c18ec89df311cf0f6a1c714ec924eebcbfdd759a669b90e711\r\nStatus: Downloaded newer image for hello-world:latest\r\n\r\nHello from Docker!\r\nThis message shows that your installation appears to be working correctly.\r\n\r\nTo generate this message, Docker took the following steps:\r\n 1. The Docker client contacted the Docker daemon.\r\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\r\n 3. The Docker daemon created a new container from that image which runs the\r\n    executable that produces the output you are currently reading.\r\n 4. The Docker daemon streamed that output to the Docker client, which sent it\r\n    to your terminal.\r\n\r\nTo try something more ambitious, you can run an Ubuntu container with:\r\n $ docker run -it ubuntu bash\r\n\r\nShare images, automate workflows, and more with a free Docker ID:\r\n https:\/\/cloud.docker.com\/\r\n\r\nFor more examples and ideas, visit:\r\n https:\/\/docs.docker.com\/engine\/userguide\/<\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[233,242,245],"manual_kb_tag":[447],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2895"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2895"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2895\/revisions"}],"predecessor-version":[{"id":2896,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2895\/revisions\/2896"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2895"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2895"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}