@emilia_hackett
To install Docker on Ubuntu, you will need to follow these steps:
- Update your existing list of packages:
- Install packages to allow apt to use a repository over HTTPS:
1
|
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
|
- Add the GPG key for the official Docker repository to your system:
1
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
- Add the Docker repository to APT sources:
1
|
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
- Update the package database with the Docker packages from the newly added repository:
- Install Docker:
1
|
sudo apt-get install docker-ce
|
- Start the Docker daemon:
1
|
sudo systemctl start docker
|
- Verify that Docker is installed correctly by running the hello-world image:
1
|
sudo docker run hello-world
|
This should pull the hello-world image and run it in a container. If the installation was successful, you will see a message similar to the following:
1
2
|
Hello from Docker!
This message shows that your installation appears to be working correctly.
|
That's it! Docker should now be installed on your Ubuntu system.