📅  最后修改于: 2023-12-03 15:14:45.539000             🧑  作者: Mango
Docker Engine is a containerization technology that allows you to package applications and services into self-contained containers that can be easily deployed and managed on any infrastructure. Installing Docker Engine on Ubuntu is a straightforward process that can be completed in a few simple steps.
Before you install Docker Engine on Ubuntu, you must have the following:
To install Docker Engine on Ubuntu, follow these steps:
Make sure that the package index on your Ubuntu system is up-to-date by running the following command in your terminal:
sudo apt-get update
Install the required packages for Docker Engine by running the following command in your terminal:
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
Add Docker's official GPG key to your system by running the following command in your terminal:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add Docker's official repository to your system by running the following command in your terminal:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Finally, install Docker Engine by running the following command in your terminal:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Once you have installed Docker Engine on Ubuntu, you can verify the installation by running the following command in your terminal:
sudo docker run hello-world
If Docker Engine is installed correctly, you will see a message that says "Hello from Docker!" in your terminal.
In this guide, we have covered the steps required to install Docker Engine on Ubuntu. With Docker, you can easily package applications and services into self-contained containers that can be easily deployed and managed on any infrastructure.