{"id":32068,"date":"2020-01-27T15:38:09","date_gmt":"2020-01-27T21:38:09","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=32068"},"modified":"2022-06-03T03:33:12","modified_gmt":"2022-06-03T08:33:12","slug":"how-to-install-docker-on-debian-10","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/","title":{"rendered":"How to Install Docker on Debian 10"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-32276\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we will learn how to install and use Docker on a <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Debian 10 VPS<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-32277\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/configuring-docker-virtualization-platform-on-debian10-vps.jpg\" alt=\"\" width=\"120\" height=\"103\" \/>Docker is a free and open-source tool that uses OS-level virtualization to deliver software in packages called containers. Docker is specially designed to make it easier to create, deploy and run applications by using containers. Docker containers are lightweight and very similar to Virtual Machine, using the host OS. Containers allow you to package up an application with all required libraries and other dependencies and ship it in one package.<\/p>\n<p>Docker shares the same Linux kernel and other resources as the system that they&#8217;re running on, and only require the application along with its dependencies to be packaged. This will speed up your system performance and reduces the size of the application. Docker is free, so anyone can contribute to Docker and it being open-source allows anyone to extend it and meet their own needs. The main goal for the Docker is for developers to develop the applications easily, ship them into containers, and deploy it anywhere.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69edf877a274b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69edf877a274b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Prerequisites\" >Prerequisites:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Step-1-Log-in-via-SSH-and-Update-Packages\" >Step 1: Log in via SSH and Update Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Step-2-Install-Docker\" >Step 2: Install Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Step-2a-Install-a-Specific-Version-of-Docker\" >Step 2a: Install a Specific Version of Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Step-4-Run-the-Docker-Command-Without-Sudo\" >Step 4: Run the Docker Command Without Sudo<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#Working-with-Docker\" >Working with Docker<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>A VPS running Debian 10. For the purposes of this tutorial, we will use our <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">SSD 2 Debian 10 VPS<\/a>.<\/li>\n<li>Full SSH root access or a user with sudo privileges is also required.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Log-in-via-SSH-and-Update-Packages\"><\/span>Step 1: Log in via SSH and Update Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Log in to your Debian 10 VPS with SSH as the root user:<\/p>\n<pre>ssh root@<span style=\"color: #ff0000;\">IP_Address<\/span> -p <span style=\"color: #ff0000;\">Port_number<\/span><\/pre>\n<p>Replace \u201croot\u201d with a user that has sudo privileges if necessary. Additionally, replace \u201c<span style=\"color: #ff0000;\">IP_Address<\/span>\u201d and \u201c<span style=\"color: #ff0000;\">Port_Number<\/span>\u201d with your server\u2019s respective IP address and SSH port number. Next, let&#8217;s make sure that we&#8217;re on Debian 10. You can do that like this:<\/p>\n<pre># lsb_release -a<\/pre>\n<p>You should get this as the output:<\/p>\n<pre>Distributor ID: Debian\r\nDescription:    Debian GNU\/Linux 10 (buster)\r\nRelease:        10\r\nCodename:       buster<\/pre>\n<p>Then, run the following command to make sure that all installed packages on the server are updated to their latest available versions:<\/p>\n<pre># apt update &amp;&amp; apt upgrade\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-Docker\"><\/span>Step 2: Install Docker<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before starting, you will need to install some dependencies to allow your system to access the Docker repositories over HTTPS. You can install all of them with the following command:<\/p>\n<pre>sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common<\/pre>\n<p>Once all the required dependencies are installed, download and add the Docker&#8217;s GPG key with the following command:<\/p>\n<pre>curl -fsSL https:\/\/download.docker.com\/linux\/debian\/gpg | sudo apt-key add -<\/pre>\n<p>Next, add the Docker repository with the following command:<\/p>\n<pre>sudo add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable\"<\/pre>\n<p>Finally, update the repository and install the latest version of Docker with the following command:<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get install docker-ce<\/pre>\n<p>Once the installation has been completed, check the status of Docker with the following command:<\/p>\n<pre>sudo systemctl status docker\r\n\r\n\u25cf docker.service - Docker Application Container Engine\r\nLoaded: loaded (\/lib\/systemd\/system\/docker.service; enabled; vendor preset: enabled)\r\nActive: active (running) since Wed 2019-09-18 07:14:31 EDT; 5min ago\r\nDocs: https:\/\/docs.docker.com\r\nMain PID: 17988 (dockerd)\r\nTasks: 8\r\nMemory: 91.0M\r\nCGroup: \/system.slice\/docker.service\r\n\u2514\u250017988 \/usr\/bin\/dockerd -H fd:\/\/ --containerd=\/run\/containerd\/containerd.sock<\/pre>\n<p>You can also check the information about Docker with the following command:<\/p>\n<pre>sudo docker info<\/pre>\n<p>You should get the following output:<\/p>\n<pre>Client:\r\nDebug Mode: false\r\n\r\nServer:\r\nContainers: 0\r\nRunning: 0\r\nPaused: 0\r\nStopped: 0\r\nImages: 1\r\nServer Version: 19.03.2\r\nStorage Driver: overlay2\r\nBacking Filesystem: extfs\r\nSupports d_type: true\r\nNative Overlay Diff: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\nVolume: local\r\nNetwork: bridge host ipvlan macvlan null overlay\r\nLog: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb\r\nrunc version: 425e105d5a03fabd737a126ad93d62a9eeede87f\r\ninit version: fec3683\r\nSecurity Options:\r\napparmor\r\nseccomp\r\nProfile: default\r\nKernel Version: 4.19.0-5-amd64\r\nOperating System: Debian GNU\/Linux 10 (buster)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 987.5MiB\r\nName: debian\r\nID: DNIZ:KB6U:H3MN:RURG:G2DW:PGSF:2TIS:OPCF:RSNQ:RCGR:ZOCC:U6MF\r\nDocker Root Dir: \/var\/lib\/docker\r\nDebug Mode: false\r\nRegistry: https:\/\/index.docker.io\/v1\/\r\nLabels:\r\nExperimental: false\r\nInsecure Registries:\r\n127.0.0.0\/8\r\nLive Restore Enabled: false<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2a-Install-a-Specific-Version-of-Docker\"><\/span>Step 2a: Install a Specific Version of Docker<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In some cases, you need to install a specific version of Docker on your system. In this case, first list the available versions of Docker by running the following command:<\/p>\n<pre>sudo apt-cache madison docker-ce<\/pre>\n<p>You should see all the available version of Docker in the following output:<\/p>\n<pre>docker-ce | 5:19.03.2~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:19.03.1~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:19.03.0~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.9~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.8~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.7~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.6~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.5~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.4~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.3~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.2~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.1~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 5:18.09.0~3-0~debian-buster | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.06.3~ce~3-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.06.2~ce~3-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.06.1~ce~3-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.06.0~ce~3-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.03.1~ce-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 18.03.0~ce-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 17.12.1~ce-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages\r\ndocker-ce | 17.12.0~ce-0~debian | https:\/\/download.docker.com\/linux\/debian buster\/stable amd64 Packages<\/pre>\n<p>Next, you can install your desired version of Docker with the following command:<\/p>\n<pre>sudo apt-get install docker-ce=<\/pre>\n<p>You can replace the with the version you want to install as shown in the above list.<\/p>\n<p>For example:<\/p>\n<pre>sudo apt-get install docker-ce=18.03.1~ce-0~debian<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Run-the-Docker-Command-Without-Sudo\"><\/span>Step 4: Run the Docker Command Without Sudo<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, you will need to run Docker command with sudo privileges. If you want to run Docker command without specifying the sudo command, then you will need to add your username to the Docker group.<\/p>\n<p>You can add your username to the Docker group with the following command:<\/p>\n<pre>sudo usermod -aG docker username<\/pre>\n<p>Now, log out from the server and log in again with your username to apply for the new group membership. Now, you can run any Docker command without specifying sudo with Docker.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Working-with-Docker\"><\/span>Working with Docker<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>At this point, Docker is installed and running on your system. Now, we will learn how to pull an image and run the container with Docker.<\/p>\n<p>First, search all the images available for the Debian operating system with the following command:<\/p>\n<pre>docker search debian<\/pre>\n<p>You should see all the images in the following output:<\/p>\n<pre>NAME DESCRIPTION STARS OFFICIAL AUTOMATED\r\nubuntu Ubuntu is a Debian-based Linux operating sys\u2026 9956 [OK]\r\ndebian Debian is a Linux distribution that's compos\u2026 3214 [OK]\r\narm32v7\/debian Debian is a Linux distribution that's compos\u2026 60\r\nitscaro\/debian-ssh debian:jessie 25 [OK]\r\narm64v8\/debian Debian is a Linux distribution that's compos\u2026 21\r\nsamueldebruyn\/debian-git a minimal docker container with debian and g\u2026 21 [OK]\r\ni386\/debian Debian is a Linux distribution that's compos\u2026 10\r\nmultiarch\/debian-debootstrap multiarch ports of debian-debootstrap 9\r\neboraas\/debian Debian base images, for all currently-availa\u2026 8 [OK]\r\nvergissberlin\/debian-development Docker debian image to use for development, \u2026 6 [OK]\r\ndebian\/eol End of Life Debian versions (pointing at arc\u2026 5\r\nsmartentry\/debian debian with smartentry 4 [OK]\r\nppc64le\/debian Debian is a Linux distribution that's compos\u2026 4\r\nvicamo\/debian Debian docker images for all versions\/archit\u2026 3\r\ns390x\/debian Debian is a Linux distribution that's compos\u2026 2\r\narm32v5\/debian Debian is a Linux distribution that's compos\u2026 2\r\nvpgrp\/debian Docker images of Debian. 2\r\nholgerimbery\/debian debian multiarch docker base image 1\r\ndockershelf\/debian Repository for docker images of Debian. Test\u2026 1 [OK]\r\nfleshgrinder\/debian Debian base images for production and multis\u2026 0 [OK]\r\nspritsail\/debian-builder A Docker image based on debian:slim ideal fo\u2026 0 [OK]\r\ncasept\/debian-amd64 A debian image built from scratch. Mostly fo\u2026 0\r\namd64\/debian Debian is a Linux distribution that's compos\u2026 0\r\njdub\/debian-sources-resource Concourse CI resource to check for updated D\u2026 0 [OK]\r\n1and1internet\/debian-9-nginx-php-7.2-wordpress-4 debian-9-nginx-php-7.2-wordpress-4 0<\/pre>\n<p>Now, download the latest version of the Debian image from the above list with the following command:<\/p>\n<pre>docker pull debian<\/pre>\n<p>Once downloaded, you should get the following output:<\/p>\n<pre>Using default tag: latest\r\nlatest: Pulling from library\/debian\r\n4a56a430b2ba: Pull complete\r\nDigest: sha256:e25b64a9cf82c72080074d6b1bba7329cdd752d51574971fd37731ed164f3345\r\nStatus: Downloaded newer image for debian:latest\r\ndocker.io\/library\/debian:latest<\/pre>\n<p>You can also list the downloaded image with the following command:<\/p>\n<pre>docker images<\/pre>\n<p>You should get the following output:<\/p>\n<pre>REPOSITORY TAG IMAGE ID CREATED SIZE\r\ndebian latest c2c03a296d23 6 days ago 114MB<\/pre>\n<p>Now, run a container using the latest Debian image with the following command:<\/p>\n<pre>docker run -it debian<\/pre>\n<p>You should get the shell interface of a Debian container:<\/p>\n<pre>root@114ef7960999:\/#<\/pre>\n<p>You can exit from the container with the following command:<\/p>\n<pre>root@114ef7960999:\/#exit<\/pre>\n<p>You can also list your active or inactive container with the following command:<\/p>\n<pre>docker ps -a<\/pre>\n<p>Output:<\/p>\n<pre>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n114ef7960999 debian \"bash\" About a minute ago Exited (0) 16 seconds ago sharp_booth<\/pre>\n<p>You can also start the Debian container by specifying Container ID (114ef7960999) as shown below:<\/p>\n<pre>docker container start 114ef7960999<\/pre>\n<p>Now, attach the shell interface of a Debian container with the following command:<\/p>\n<pre>docker attach 114ef7960999\r\nOutput:\r\nroot@114ef7960999:\/#<\/pre>\n<h3>Delete a Docker Container and Image<\/h3>\n<p>You can easily remove unused containers and images that consume significant disk space.<\/p>\n<p>To remove the Docker container, first list all the container with the following command:<\/p>\n<pre>docker container ls -a<\/pre>\n<p>You should see the following output:<\/p>\n<pre>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\r\n114ef7960999 debian \"bash\" 19 hours ago Exited (0) 19 hours ago sharp_booth<\/pre>\n<p>Next, if your container is running, you will need to stop the container before removing it.<\/p>\n<p>You can stop the running container with the following command:<\/p>\n<pre>docker container stop 114ef7960999<\/pre>\n<p>Next, remove the container with the following command:<\/p>\n<pre>docker container rm 114ef7960999<\/pre>\n<p>You can also remove all stopped containers by just running the following command:<\/p>\n<pre>docker container prune<\/pre>\n<p>You should see the following warning message:<\/p>\n<pre>WARNING! This will remove all stopped containers.\r\nAre you sure you want to continue? [y\/N] y<\/pre>\n<p>Type y and hit Enter to continue:<\/p>\n<pre>Deleted Containers:\r\n114ef7960999f41bb9c4bba2cf5c28e425a00175ab20ed739213f16961b3897e\r\n\r\nTotal reclaimed space: 35B<\/pre>\n<p>To remove the Docker image, you will need to find the ID of the image you want to remove.<\/p>\n<p>You can find the image ID with the following command:<\/p>\n<pre>docker image ls<\/pre>\n<p>Output:<\/p>\n<pre>REPOSITORY TAG IMAGE ID CREATED SIZE\r\ndebian latest c2c03a296d23 7 days ago 114MB<\/pre>\n<p>Now, remove the image with the following command:<\/p>\n<pre>docker image rm c2c03a296d23<\/pre>\n<p>You should get the following output:<\/p>\n<pre>Untagged: debian:latest\r\nUntagged: debian@sha256:e25b64a9cf82c72080074d6b1bba7329cdd752d51574971fd37731ed164f3345\r\nDeleted: sha256:c2c03a296d2329a4f3ab72a7bf38b78a8a80108204d326b0139d6af700e152d1\r\nDeleted: sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d<\/pre>\n<p>Note: To remove the image, you will have to remove the container first.<\/p>\n<p>You can also remove all unused images at a time by just running the following command:<\/p>\n<pre>docker image prune -a<\/pre>\n<p>In the above tutorial, we have learned how to install Docker on a Debian 10 VPS. We have also learned how to pull an image, run container, start and stop the container.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-32278\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/expert-support-from-linux-admins-for-docker-and-debian10-vps.jpg\" alt=\"\" width=\"120\" height=\"103\" \/>Of course, you don\u2019t have to know how to install Docker on Debian 10 if you have a <a href=\"https:\/\/www.rosehosting.com\/debian-hosting.html\">Managed Debian 10 VPS<\/a> with us. You can simply ask our administrators to install Docker on Debian 10 for you. They\u2019re available 24\/7 and will be able to help you with the installation of Docker on Debian 10.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong>.<\/span> If you enjoy reading this blog post on <strong>how to install Docker on Debian 10<\/strong>, feel free to share it on social networks using the shortcuts below, or simply leave a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will learn how to install and use Docker on a Debian 10 VPS. Docker is a &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install Docker on Debian 10\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#more-32068\" aria-label=\"Read more about How to Install Docker on Debian 10\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":32276,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,13],"tags":[1836,1794],"class_list":["post-32068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","category-tutorials","tag-debian-10","tag-docker","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install Docker on Debian 10 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install Docker on Debian 10 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Docker on Debian 10\" \/>\n<meta property=\"og:description\" content=\"How to Install Docker on Debian 10 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-27T21:38:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:33:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install Docker on Debian 10\",\"datePublished\":\"2020-01-27T21:38:09+00:00\",\"dateModified\":\"2022-06-03T08:33:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/\"},\"wordCount\":1045,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/how-to-install-docker-on-debian10.jpg\",\"keywords\":[\"Debian 10\",\"docker\"],\"articleSection\":[\"Debian\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/\",\"name\":\"How to Install Docker on Debian 10 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/how-to-install-docker-on-debian10.jpg\",\"datePublished\":\"2020-01-27T21:38:09+00:00\",\"dateModified\":\"2022-06-03T08:33:12+00:00\",\"description\":\"How to Install Docker on Debian 10 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/how-to-install-docker-on-debian10.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/how-to-install-docker-on-debian10.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-docker-on-debian-10\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Docker on Debian 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install Docker on Debian 10 | RoseHosting","description":"How to Install Docker on Debian 10 | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Docker on Debian 10","og_description":"How to Install Docker on Debian 10 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-01-27T21:38:09+00:00","article_modified_time":"2022-06-03T08:33:12+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install Docker on Debian 10","datePublished":"2020-01-27T21:38:09+00:00","dateModified":"2022-06-03T08:33:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/"},"wordCount":1045,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg","keywords":["Debian 10","docker"],"articleSection":["Debian","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/","name":"How to Install Docker on Debian 10 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg","datePublished":"2020-01-27T21:38:09+00:00","dateModified":"2022-06-03T08:33:12+00:00","description":"How to Install Docker on Debian 10 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/01\/how-to-install-docker-on-debian10.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-docker-on-debian-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Docker on Debian 10"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/32068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=32068"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/32068\/revisions"}],"predecessor-version":[{"id":41672,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/32068\/revisions\/41672"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/32276"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=32068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=32068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=32068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}