- Docker Quick Start Guide
- Earl Waud
- 486字
- 2021-06-10 19:07:02
Installing Docker CE via the Docker Repository
We need to set up the Docker repository first, and then we can do the installation, so let's take care of the repo now.
The first step will be to update the apt package index. Use the following command to do that:
# update apt-get libraries
sudo apt-get update
Now we need to install some supporting packages:
# install required packages
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
Next, we need to get the GPG key for Docker:
# get the GPG key for docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo apt-key add -
You can confirm that you have added Docker's GPG key successfully; it will have a fingerprint of 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.
You can verify the key by checking the last eight characters match 0EBFCD88 with this command:
# validating the docker GPG key is installed
sudo apt-key fingerprint 0EBFCD88
Finally, we need to actually set up the repository. We will be focusing on the stable repo for our examples.
If you want to install the edge or test versions of Docker CE, be sure to add the word edge or test after the word stable (do not replace the word stable) in the following command:
# adding the docker repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Now that our system is set up with the correct repository for installing Docker CE, let's install it.
Start by making sure that all of the packages are up to date by issuing the apt-get update command:
# update apt-get libraries again
sudo apt-get update
And now we will actually install Docker CE:
# install docker
sudo apt-get install docker-ce
Docker is installed. You can check the Docker version after the install to confirm a successful installation:
# validate install with version command
docker --version
The version command should look something like this:

Now, let's validate that the Docker installation is working as desired. To do this, we will run the hello-world Docker image using the following command:
# validating functionality by running a container
sudo docker run hello-world

Did you notice something interesting happened?
We did not have to start Docker after the installation as we did in the CentOS installation. That is because, on DEB-based Linux systems, the install process also starts Docker for us. Additionally, the Ubuntu workstation is configured to start Docker on boot. So both of the Docker start steps are handled for you during the installation. Nice! Your Ubuntu workstation now has Docker installed and we've verified it is working as desired.
Although using the Docker repository is the best way to install Docker on your workstation, let's take a quick look at another way to install Docker CE on an Ubuntu workstation, that being by manually installing it with a DEB package.
- 課課通計(jì)算機(jī)原理
- Dreamweaver CS3網(wǎng)頁(yè)設(shè)計(jì)與網(wǎng)站建設(shè)詳解
- 智能工業(yè)報(bào)警系統(tǒng)
- 觸控顯示技術(shù)
- Splunk Operational Intelligence Cookbook
- Implementing Splunk 7(Third Edition)
- JSP從入門到精通
- 悟透JavaScript
- 分析力!專業(yè)Excel的制作與分析實(shí)用法則
- Building a BeagleBone Black Super Cluster
- Word 2007,Excel 2007辦公應(yīng)用融會(huì)貫通
- Photoshop CS5圖像處理入門、進(jìn)階與提高
- Mastering Geospatial Analysis with Python
- Mastering Ceph
- Windows安全指南