发布于 2026年7月9日

A Beginner’s Guide to Installing Docker on Ubuntu

Docker has revolutionized the way developers build, ship, and run applications by providing a platform for containerization. Containers allow applications to run reliably in different computing environments, making development and deployment more efficient and consistent. If you’re using Ubuntu as your development environment, installing Docker is straightforward and can be done in just a few steps. In this guide, we’ll walk you through the process of installing Docker on Ubuntu.

Before installing any new software, it’s a good practice to update your system’s package index to ensure you’re installing the latest versions of packages. Open a terminal window by pressing Ctrl + Alt + T and type the following command:

You may need to enter your password to proceed.

To ensure that Ubuntu is able to download packages from repositories over HTTPS, you’ll need to install some necessary dependencies. Enter the following command in your terminal:

Docker’s official GPG key is required to verify the authenticity of downloaded packages. Use the following command to download and add Docker’s GPG key:

Once you’ve added Docker’s GPG key, you’ll need to add the Docker repository to your system’s software repository list. This can be done with the following command: