Install_Docker_Engine_on_Ubuntu_Docker_Documentation
Install_Docker_Engine_on_Ubuntu_Docker_Documentation
To get started with Docker Engine on Ubuntu, make sure you meet the prerequisites, then install Docker.
Prerequisites
OS requirements
To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:
Docker Engine is supported on x86_64 (or amd64 ), armhf , arm64 , and s390x architectures.
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
The contents of /var/lib/docker/ , including images, containers, volumes, and networks, are preserved. If you
do not need to save your existing data, and want to start with a clean installation, refer to the uninstall Docker
Engine section at the bottom of this page.
Docker Engine uses the overlay2 storage driver by default. If you need to use aufs instead, you need to
configure it manually. See use the AUFS storage driver
Installation methods
You can install Docker Engine in different ways, depending on your needs:
Most users set up Docker’s repositories and install from them, for ease of installation and upgrade tasks. This
is the recommended approach.
Some users download the DEB package and install it manually and manage upgrades completely manually.
This is useful in situations such as installing Docker on air-gapped systems with no access to the internet.
In testing and development environments, some users choose to use automated convenience scripts to install
Docker.
3. Use the following command to set up the stable repository. To add the nightly or test repository, add the
word nightly or test (or both) after the word stable in the commands below. Learn about nightly and
test channels.
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
$ echo \
"deb [arch=$(dpkg --print-architecture) 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
2. To install a specific version of Docker Engine, list the available versions in the repo, then select and install:
b. Install a specific version using the version string from the second column, for example,
5:18.09.1~3-0~ubuntu-xenial .
3. Verify that Docker Engine is installed correctly by running the hello-world image.
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
This command downloads a test image and runs it in a container. When the container runs, it prints a
message and exits.
Docker Engine is installed and running. The docker group is created but no users are added to it. You need to
use sudo to run Docker commands. Continue to Linux postinstall to allow non-privileged users to run Docker
commands and for other optional configuration steps.
Note
To install a nightly or test (pre-release) package, change the word stable in
the above URL to nightly or test . Learn about nightly and test channels.
2. Install Docker Engine, changing the path below to the path where you downloaded the Docker package.
3. Verify that Docker Engine is installed correctly by running the hello-world image.
This command downloads a test image and runs it in a container. When the container runs, it prints a
message and exits.
Docker Engine is installed and running. The docker group is created but no users are added to it. You need to
use sudo to run Docker commands. Continue to Post-installation steps for Linux to allow non-privileged users to
run Docker commands and for other optional configuration steps.
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
To upgrade Docker Engine, download the newer package file and repeat the installation procedure, pointing to the
new file.
Always examine scripts downloaded from the internet before running them locally. Before installing, make yourself
familiar with potential risks and limitations of the convenience script:
This example downloads the script from get.docker.com and runs it to install the latest stable release of Docker on
Linux:
Docker is installed. The docker service starts automatically on Debian based distributions. On RPM based
distributions, such as CentOS, Fedora, RHEL or SLES, you need to start it manually using the appropriate
systemctl or service command. As the message indicates, non-root users cannot run Docker commands by
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
default.
Install pre-releases
Docker also provides a convenience script at test.docker.com to install pre-releases of Docker on Linux. This
script is equivalent to the script at get.docker.com , but configures your package manager to enable the “test”
channel from our package repository, which includes both stable and pre-releases (beta versions, release-
candidates) of Docker. Use this script to get early access to new releases, and to evaluate them in a testing
environment before they are released as stable.
To install the latest version of Docker on Linux from the “test” channel, run:
2. Images, containers, volumes, or customized configuration files on your host are not automatically removed.
To delete all images, containers, and volumes:
Next steps
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
Product offerings
Docker Personal
Docker Pro
Docker Team
Docker Business
Compare Subscriptions
Features
Docker Desktop
Docker Hub
Container Runtime
Developer Tools
Trusted Content
Developers
Use Cases
Get Started
Blog
Community
Open Source
Preview Program
Pricing
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]
Install Docker Engine on Ubuntu | Docker Documentation
FAQ
Partners
About Us
What is a Container?
Why Docker?
Virtual Events
Swag Store
Newsroom
Careers
Contact Us
Customers
Newsletter
https://docs.docker.com/engine/install/ubuntu/[30.11.2021 14:09:44]