Setting Up Docker and Docker Compose on Debian 12 Rumi, December 27, 2024 Installing Docker on Debian 12 Before installing Docker, ensure your Debian system is up-to-date with the following command: sudo apt update && sudo apt upgrade -y Once your system is updated, install the necessary packages to allow apt to use a repository over HTTPS: sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg2 -y Next, add the official GPG key of Docker: curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - Add the Docker repository to APT sources: echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list Update your package index and install Docker CE (Community Edition): sudo apt update && sudo apt install docker-ce -y To ensure Docker starts on boot, use the following command: sudo systemctl enable docker Verify the Docker installation by running the hello-world image: sudo docker run hello-world Installing Docker Compose on Debian 12 Docker Compose is a tool for defining and running multi-container Docker applications. To install Docker Compose, first, download the latest version from the official GitHub repository: sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose Next, set the appropriate permissions to make the binary executable: sudo chmod +x /usr/local/bin/docker-compose Verify the installation by checking the version of Docker Compose: docker-compose --version At this point, Docker and Docker Compose are installed and ready for use on your Debian 12 system. Using Docker and Docker Compose With Docker, you can build, ship, and run containers from your applications. Docker Compose facilitates the management of multi-container applications. To run the application stack defined in the Docker Compose file, navigate to the directory containing the file and execute: docker-compose up Src: https://reintech.io/blog/setting-up-docker-docker-compose-debian-12 Administrations Collected Articles Configurations (Linux) DebianDebian 12DockerDocker Compose