Docker provides container software that is ideal for developers and teams looking to get started and experimenting with container-based applications.
If you are looking to explore docker then a local install on Ubuntu desktop is a good place to start.
The following steps should get you up and running with docker on Ubuntu.
- Log into your workstation and open a terminal.
- Run the following command to check if there are any older version of docker installed and uninstall if there are.
- Before you install Docker CE for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from this repository.
To find out more about Ubuntu repositories, check the following link.
- To set up your repository run the following commands.
sudo apt-get update
- Install packages to allow apt to use a repository over HTTPS
sudo apt-get install \
- Add Docker’s official GPG key with the following command
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
To find out more about gpg keys check out the following link
- Now if you enter the command sudo apt-key list you will see your docker key listed at the bottom of the output.
- Use the following command to add the repository as a stable
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
- Now you are ready to install docker.
First run sudo apt-get update
Then run sudo apt-get install docker-ce
- Docker should now be installed. To confirm type docker –version and hit enter
- To verify docker is working correctly type sudo docker run hello-world.
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
You should see the following
If you see the Hello from docker message it means your install was successful.
- You should now explore docker a bit more by running through the getting started tutorials on the docker website