{"id":1874,"date":"2021-09-15T16:09:57","date_gmt":"2021-09-15T23:09:57","guid":{"rendered":"https:\/\/jim-zimmerman.com\/?p=1874"},"modified":"2021-09-15T16:09:57","modified_gmt":"2021-09-15T23:09:57","slug":"docker-installation-on-debian","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1874","title":{"rendered":"Docker installation on Debian"},"content":{"rendered":"<p>Remove any old versions of docker:<\/p>\n<blockquote><p>sudo apt-get remove docker docker-engine docker.io containerd runc<\/p><\/blockquote>\n<p>Install dependencies:<\/p>\n<blockquote><p>sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release<\/p><\/blockquote>\n<p>Add the docker key:<\/p>\n<blockquote><p>curl -fsSL https:\/\/download.docker.com\/linux\/debian\/gpg | sudo gpg &#8211;dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg<\/p><\/blockquote>\n<p>Add the docker repository to the apt configuration:<\/p>\n<blockquote><p>echo &#8220;deb [arch=amd64 signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable&#8221; | sudo tee \/etc\/apt\/sources.list.d\/docker.list > \/dev\/null<\/p><\/blockquote>\n<p>Update the repository list:<\/p>\n<blockquote><p>sudo apt-get update<\/p><\/blockquote>\n<p>Install docker:<\/p>\n<blockquote><p>sudo apt-get install docker-ce docker-ce-cli containerd.io<\/p><\/blockquote>\n<p>Test docker by installing and running the hello-world image from Docker Hub:<\/p>\n<blockquote><p>sudo docker run hello-world<\/p><\/blockquote>\n<p>Install docker-compose from https:\/\/github.com\/docker\/compose\/releases\/:<\/p>\n<p>Download the docker-compose binary and sha256sum file:<\/p>\n<blockquote><p>cd \/usr\/local\/src\/<br \/>\nwget https:\/\/github.com\/docker\/compose\/releases\/download\/1.29.2\/docker-compose-Linux-x86_64<br \/>\nwget https:\/\/github.com\/docker\/compose\/releases\/download\/1.29.2\/docker-compose-Linux-x86_64.sha256<\/p><\/blockquote>\n<p>Verify the sha256sum for the binary:<\/p>\n<blockquote><p>sha256sum -c docker-compose-Linux-x86_64.sha256sum<\/p><\/blockquote>\n<p>Copy the binary to your path (\/usr\/local\/bin) and set the execute permissions:<\/p>\n<blockquote><p>cp -p docker-compose-Linux-x86_64 \/usr\/local\/bin\/docker-compose<br \/>\nchmod 744 \/usr\/local\/bin\/docker-compose <\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Remove any old versions of docker: sudo apt-get remove docker docker-engine docker.io containerd runc Install dependencies: sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release Add the docker key: curl -fsSL https:\/\/download.docker.com\/linux\/debian\/gpg | sudo gpg &#8211;dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg Add the docker repository to the apt configuration: echo &#8220;deb [arch=amd64 signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable&#8221; | sudo [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[494,334,48],"class_list":["post-1874","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-docker","tag-install","tag-linux"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1874"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1874\/revisions"}],"predecessor-version":[{"id":1875,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1874\/revisions\/1875"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}