In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains how to install docker in ubuntu20.04 LTS, the content is clear, interested friends can learn, I believe it will be helpful after reading.
Zero: uninstall the old version
Older versions of Docker are called docker,docker.io or docker-engine. If installed, uninstall them:
$sudo apt-get remove docker docker-engine docker.io containerd runc
Currently known as the Docker Engine-Community package docker-ce.
One: set up the warehouse
Before installing Docker Engine-Community on the new host for the first time, you need to set up the Docker repository. You can then install and update Docker from the repository.
Update the apt package index.
$sudo apt-get update
Install the apt dependency package, which is used to obtain the repository through HTTPS:
$sudo apt-get install\ apt-transport-https\ ca-certificates\ curl\ gnupg-agent\ software-properties-common
Add the official GPG key for Docker:
$curl-fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add-
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 verifies that you now have a key with a fingerprint by searching for the last 8 characters of the fingerprint.
$sudo apt-key fingerprint 0EBFCD88 pub rsa4096 2017-02-22 [SCEA] 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88uid [unknown] Docker Release (CE deb) sub rsa4096 2017-02-22 [S]
Use the following instructions to set up the stable version repository
Note: there is no domestic docker source at present, version 18.04 is used temporarily.
$sudo add-apt-repository\ "deb [arch=amd64] https://download.docker.com/linux/ubuntu\ bionic\ stable"
Two: install Docker Engine-Community
Update the apt package index.
$sudo apt-get update
Install the latest versions of Docker Engine-Community and containerd
$sudo apt-get install docker-ce docker-ce-cli containerd.io
Three: testing
Input
$sudo docker run hello-world
If docker says hello to you-- or output similar to the following
Unable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world1b930d010525: Pull complete Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5fStatus: Downloaded newer image for hello-world:latestHello from docking this message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $docker run-it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://hub.docker.com/For more examples and ideas, visit: https://docs.docker.com/get-started/
It means the installation is over.
4: sudo-free operation & image acceleration
Free of sudo
Refer to the following method to add users to the docke group
$sudo usermod-aG docker [your user name]
Restart docker
After reading the above, does sudo systemctl restart docker have a further understanding of how ubuntu20.04 LTS installs docker? if you want to learn more, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.