**This study guide is based on the video lesson available on TrainerTests.
com**
Installing Docker Engine on Ubuntu Study Guide
This chapter guides you through the installation process for Docker Engine on an Ubuntu desktop
system. Docker Engine is the core software that enables you to build, run, and manage containerized
applications.
1.1 Understanding Docker on Ubuntu
• Key Distinction: Installing Docker on Ubuntu differs from macOS and Windows. On those
operating systems, Docker Desktop provides a virtualized environment to run Docker Engine.
However, Ubuntu allows you to install Docker Engine directly on the kernel, eliminating the
need for an additional virtual machine.
1.2 Prerequisites
• Functional Ubuntu Desktop: Ensure you have a working Ubuntu desktop environment
installed on your system. If you are new to Linux or require assistance setting up Ubuntu, the
video suggests referring to a separate "Introduction to Linux-90 Minute Crash Course" for
guidance.
1.3 Installation Steps
1. Open Terminal: Launch the terminal application on your Ubuntu desktop. This is where you'll
issue commands to interact with the system.
2. Become Superuser (Optional): The video recommends using sudo to gain superuser
privileges for convenience when issuing commands. However, this step might be skipped
depending on your workflow and security preferences.
o Command (if using sudo): sudo -s
3. Remove Existing Docker Files (Optional): The video suggests running a command to
remove any lingering Docker files from the system before installation. You'll find the specific
command in the course resources.
4. Install Docker Engine: Execute the following command to install Docker Engine on your
Ubuntu system:
o sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli
containerd.io
o Explanation:
▪ sudo apt-get update: Updates the list of available packages.
▪ sudo apt-get install: Installs the specified packages.
▪ docker-ce: Docker Engine package
▪ docker-ce-cli: Docker command-line interface
▪ containerd.io: Container runtime dependency
5. Install Updates: It's recommended to update your system after installing Docker Engine:
o sudo apt-get upgrade && sudo apt-get update
6. Install Docker Dependencies: Certain additional packages might be required for Docker
functionality. The video suggests running a command to install these dependencies, but the
specific command is not provided. You can consult the course resources for details on these
dependencies and the recommended installation command.
1.4 Verification
1. Verify Docker Installation: Use the following command to check if Docker Engine is installed
successfully:
o docker version
o This command should display the Docker Engine version information if the installation
was successful.
2. Pull a Sample Image: Use the following command to pull a sample image (hello-world) from
Docker Hub, a repository for container images:
o docker pull hello-world
o Docker Hub provides a vast collection of container images that you can leverage for
various purposes.
3. List Docker Images: Use the following command to view the list of Docker images currently
available on your system:
o docker images
o This command should display the hello-world image that you pulled in the previous step.
4. List Docker Containers: Use the following command to see the list of Docker containers:
o docker ps
o Initially, you won't see any running containers because the hello-world image hasn't
been launched yet.
5. View Running Containers: Use the following command to specifically list containers in a
running state:
o docker ps -a
o The output should confirm that the hello-world container is not currently running.
1.5 Summary
By following these steps, you've successfully installed Docker Engine on your Ubuntu desktop. You
can now explore using Docker to build, run, and manage containerized applications. The video
mentions the possibility of launching the hello-world container, but that exercise is not covered in this
chapter.