{"id":19990,"date":"2023-07-31T07:39:11","date_gmt":"2023-07-31T07:39:11","guid":{"rendered":"https:\/\/linuxways.net\/?p=19990"},"modified":"2023-07-31T07:39:11","modified_gmt":"2023-07-31T07:39:11","slug":"how-to-install-docker-compose-on-debian-12","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-docker-compose-on-debian-12\/","title":{"rendered":"How to Install Docker Compose on Debian 12"},"content":{"rendered":"<p>Docker is an open-source platform used by developers worldwide to automate processes such as deployment, application management, and scaling with the aid of containerization. Created by Docker, Inc. it has earned its huge popularity in the software community.<\/p>\n<p>Portability, efficiency, Isolation, Scalability, Security, and easy management are some of the prominent features of this platform that makes people go for it. Overall, Docker simplifies the application deployment process, increases development productivity, and enhances the scalability and reliability of applications, making it a valuable tool for modern software development and DevOps practices.<\/p>\n<h2><strong>Advantages of Docker Compose<\/strong><\/h2>\n<p><strong>Multi-Container Orchestration:<\/strong> Docker Compose simplifies managing multi-container applications, allowing you to define, configure, and run multiple containers as a single service.<\/p>\n<p><strong>Version Control:<\/strong> Docker Compose YAML files offer version-controlled configuration, ensuring consistency and reproducibility across development, testing, and production environments.<\/p>\n<p><strong>Easy Deployment:<\/strong> Compose enables straightforward deployment with a single command, streamlining the process of launching complex applications with interconnected services.<\/p>\n<p><strong>Service Scaling:<\/strong> Scaling services in Docker Compose is effortless, allowing you to replicate containers and adjust resources to meet varying workloads.<\/p>\n<p><strong>Network Management:<\/strong> Compose simplifies networking, facilitating communication between containers and enabling seamless connections within defined networks.<\/p>\n<h3><strong>Installation Process<\/strong><\/h3>\n<p>The good thing about this platform is its ability to be compatible with every operating system. We can use this one in Linux distributions as well.<\/p>\n<h3><strong>Update Debian 12<\/strong><\/h3>\n<p>Updating Debian will ensure we have the latest packages and will also simplify the Docker Compose installation process.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> apt update<\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"572\" class=\"wp-image-19992\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-1.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-1-300x229.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/strong><\/p>\n<h3><strong>Install Dependency Packages<\/strong><\/h3>\n<p>To install Docker compose, we need to install all the dependency packages.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> apt <span class=\"re5\">-y<\/span> <span class=\"kw2\">install<\/span> apt-transport-https ca-certificates curl gnupg2 software-properties-common<\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"573\" class=\"wp-image-19993\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-2.png 735w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-2-300x234.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/strong><\/p>\n<h3><strong>Add Docker GPG key<\/strong><\/h3>\n<p>Now we will import and add the official Docker GPG key.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span>curl <span class=\"re5\">-fsSL<\/span> https:<span class=\"sy0\">\/\/<\/span>download.docker.com<span class=\"sy0\">\/<\/span>linux<span class=\"sy0\">\/<\/span>debian<span class=\"sy0\">\/<\/span>gpg <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> gpg <span class=\"re5\">--dearmor<\/span> <span class=\"re5\">-o<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>apt<span class=\"sy0\">\/<\/span>trusted.gpg.d<span class=\"sy0\">\/<\/span>docker-archive-keyring.gpg<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"565\" class=\"wp-image-19994\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-3.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-3-300x232.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<h3><strong>Add Docker Repository in Debian 12<\/strong><\/h3>\n<p>Now we will be adding the Docker repository in our Debian 12.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> add-apt-repository \\ <span class=\"st0\">&quot;deb [arch=amd64] https:\/\/download.docker.com\/linux\/debian \\ <span class=\"es4\">$(lsb_release -cs)<\/span> \\ stable&quot;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"574\" class=\"wp-image-19995\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-4.png 739w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-4-300x233.png 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/p>\n<h3><strong>Install Docker on Debian 12<\/strong><\/h3>\n<p>Now we need to install Docker. For that, we have a command available as follows.<\/p>\n<p>&nbsp;<\/p>\n<p>$ sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y<\/p>\n<p>[\/cc]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"576\" class=\"wp-image-19996\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-5.png 738w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-5-300x234.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/p>\n<h3><strong>Enable Docker<\/strong><\/h3>\n<p>Now we need to enable Docker in our Debian 12.<\/p>\n<p>&nbsp;<\/p>\n<p>$ sudo systemctl enable &#8211;now docker<\/p>\n<p>[\/cc]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"733\" height=\"570\" class=\"wp-image-19997\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-6.png 733w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-6-300x233.png 300w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/p>\n<h3><strong>Check Docker Version<\/strong><\/h3>\n<p>To check the docker version in Debian 12, we will be using the following command.<\/p>\n<p>&nbsp;<\/p>\n<p>$ docker version<\/p>\n<p>[\/cc]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"552\" class=\"wp-image-19998\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-7.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-7-300x226.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<h3><strong>Uninstall Docekr<\/strong><\/h3>\n<p>The docker uninstallation process is really simple. We have remove command that will uninstall it.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get purge<\/span> docker-ce docker-ce-cli containerd.io<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"552\" class=\"wp-image-19999\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-8.png 735w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-8-300x225.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/p>\n<p>To remove all the remaining packages automatically, we have a command as<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get autoremove<\/span><\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"547\" class=\"wp-image-20000\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-9.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-19990-9-300x224.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/strong><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Docker is an engine that allows programmers, developers and system architects to create different containers and then deploy multiple applications at the same time. This platform can be used in almost every system.<\/p>","protected":false},"excerpt":{"rendered":"<p>Docker is one of the most used and popular containers that people use to create different containers to run multiple applications at the same time.<\/p>","protected":false},"author":110,"featured_media":20003,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-19990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/19990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=19990"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/19990\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/20003"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=19990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=19990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=19990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}