Install Docker Engine on Ubuntu Computer
Introduction
In this exercise, you will install the Docker Engine on an Ubuntu system. Docker is an open-source platform that allows you to automate the deployment, scaling, and management of applications within lightweight, portable containers. By the end of this exercise, you will have Docker installed on your Ubuntu system, enabling you to run and manage containers for application development and testing.
Objectives
By completing this exercise, you will:
- Learn how to install Docker Engine on an Ubuntu computer.
- Understand the basics of Docker and containerization.
- Gain hands-on experience in setting up and using Docker to manage containers on your system.
Materials
You will need the following supplies to complete the exercise:
- A computer running Ubuntu 18.04 or later.
- An active internet connection.
- Access to the terminal or command line interface.
Preparation Steps
- Ensure your Ubuntu system is updated:
- Open a terminal window.
- Run the following command to update your system's package index:
sudo apt update
- Install necessary dependencies to allow
apt
to use packages over HTTPS:
Execution Steps
Follow these steps to install Docker Engine on your Ubuntu system:
Add Docker's official GPG key:
Set up the Docker stable repository:
Update the package index again:
- Run the following command to refresh the package list with the new Docker repository:
sudo apt update
Install Docker Engine:
Verify Docker Installation:
Run Docker without sudo
(Optional):
Test Docker:
- Run the following command to test if Docker is working properly:
docker --version
Further Reading
To deepen your understanding of Docker and containerization, you may explore the following resources: