- First, update your existing list of packages:
sudo apt update
- Next, install a few prerequisite packages which let apt use packages over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
- Then add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
- Next, update the package database with the Docker packages from the newly added repo:
sudo apt update
- Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:
apt-cache policy docker-ce
- Finally, install Docker:
sudo apt install docker-ce
- Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it's running:
sudo systemctl status docker
- If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group:
sudo usermod -aG docker ${USER}
- Logout and login again. Now you will be able to run docker commands as the user
- First, update your existing list of packages:
sudo apt update
- Next, install a few prerequisite packages which let apt use packages over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
- Then add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
- Next, update the package database with the Docker packages from the newly added repo:
sudo apt update
- Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:
apt-cache policy docker-ce
- Finally, install Docker:
sudo apt install docker-ce
- Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it's running:
sudo systemctl status docker
- If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group:
sudo usermod -aG docker ${USER}
- Run update
yum update -y
- Add the yum repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
- Install the Docker package.
sudo yum install -y docker-engine
- Enable the service.
sudo systemctl enable docker.service
- Start the Docker daemon.
sudo systemctl start docker
- If you want to be able to use docker from a non root user run below command from that user (note that this user needs sudo privilege)
sudo usermod -aG docker $(whoami)
-
Logout and login again
-
Now you can start using docker as the user
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
- Run update
yum update -y
- Install the most recent Docker Engine package.
If using Amazon Linux 2 run below command
sudo amazon-linux-extras install docker
If using Amazon Linux run below command
sudo yum install docker
- Install Docker
sudo yum install docker
- Start the docker service
sudo service docker start
- Set permissions for user to use docker commands
sudo usermod -a -G docker ec2-user
Follow the steps provided here to install Docker Desktop on Windows