Docker is a popular platform for developing, shipping, and running applications inside containers. Docker Compose is a tool for defining and running multi-container Docker applications. In this guide, we will walk you through the steps to install Docker and Docker Compose on Debian 11.
Step 1: Update Your System
Start by ensuring your system is up to date:
sudo apt update && sudo apt upgrade -y
Step 2: Install Required Packages
Install the required packages to allow apt
to use a repository over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
Step 3: Add Docker’s Official GPG Key
Add the Docker GPG key to your system:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Step 4: Add the Docker Repository
Add the Docker repository to your 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
Step 5: Install Docker
Update the package index again and install Docker:
sudo apt update
sudo apt install docker-ce -y
Step 6: Start and Enable Docker
Start the Docker service and enable it to start on boot:
sudo systemctl start docker
sudo systemctl enable docker
Step 7: Verify Docker Installation
Check if Docker is installed correctly by running:
sudo docker run hello-world
Step 8: Install Docker Compose
Download the latest version of Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Set the permissions:
sudo chmod +x /usr/local/bin/docker-compose
Step 9: Verify Docker Compose Installation
Check if Docker Compose is installed correctly:
docker-compose --version
Conclusion
You have successfully installed Docker and Docker Compose on Debian 11. This powerful toolset will help you manage your applications efficiently.
If you're looking for a reliable hosting solution for your Docker applications, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.
For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.