Reading time: | 15 min |
Last updated: | 31 May 2024 |
Reading time: |
15 min |
Last updated: |
31 May 2024 |
This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.
For any Linux machine, the commands below will install Docker.
These commands are the (almost) universal install instructions for Docker on Linux.
The commands work on any architecture, and on any system running Linux, from a cloud server to a Raspberry Pi.
The commands can also be used in the Windows Subsystem for Linux 2 (WSL 2) and on a Chromebook.
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
Add the user to the docker group. The newgrp
command avoids the need to logout and back in.
sudo usermod -aG docker $USER ; newgrp docker
To confirm the installation is successful run:
docker run hello-world
The output should be a welcome message such as:
Hello from Docker!
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.
(arm64v8)
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 bash
Share 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/
Use the uname
command to identify the architecture:
uname -m
Output values can be aarch64
(Arm 64-bit), armv7l
(Arm 32-bit) or x86_64
.
The Stable channel (get.docker.com
) provides the latest releases for general availability.
The Test channel (test.docker.com
) installs pre-releases that are for testing before general availability.
Replace get.docker.com
with test.docker.com
above to use the test version.
Some Linux distributions are not supported by get.docker.com
Generally, the supported list is:
An example of a distribution which is not supported and popular on Arm is Manjaro .
On Manjaro, install docker using pacman
.
sudo pacman -Syu
sudo pacman -S docker
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $USER ; newgrp docker
To confirm the installation is successful run the same hello-world as above.
docker run hello-world
To start the docker daemon.
sudo systemctl start docker
To stop the docker daemon.
sudo systemctl stop docker
If a message is displayed:
Warning: Stopping docker.service, but it can still be activated by:
docker.socket
Then stop docker.socket:
sudo systemctl stop docker.socket
Docker Engine is now ready to use. You can explore Docker related Learning Paths .
You may want to create an account on Docker Hub to share images and automate workflows.
How would you rate the overall quality of this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you. We're grateful for your feedback on how to improve this tool quick-install guide.