debian docker 1

debian docker

# Install docker
sudo apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install -y docker-ce

# Install docker-compose
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Here is what the above code is Doing:
1. Install the required packages for docker
2. Add the GPG key for the official Docker repository to the system
3. Add the Docker repository to APT sources
4. Update the package database with the Docker packages from the newly added repo
5. Install Docker
6. Install docker-compose

Similar Posts