Install Docker
# Add dependent packages. apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common # Add Docker’s official GPG key. curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - # Add Docker’s repository to apt-get. add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" # Update list of packages of Docker’s repository. apt-get update # Install Docker. apt-get install -y docker-ce docker-ce-cli containerd.io
Test docker
docker run hello-world
Output
Reference
- https://docs.docker.com/install/linux/docker-ce/debian/