[Optional] Install packages to allow apt to use a repository over HTTPS:
Add Docker’s official GPG key:
Set up the repository:
Update the apt package index:
Install the latest version of Docker Engine and containerd:
Check installed packages
Check Docker daemon (dockerd server):
Check Docker service:
Check containerd Service:
Check Docker Version
Print Docker Information
The above command is similar to docker system info.
Both commands will show warnings with your Docker installation if any.
The command docker system provides more options:
You can print the Docker disk usage:
Verify that Docker Engine is installed correctly
The command "docker run hello-world" downloads the hello-world image and runs it in a container.
When the container runs, it prints a "Hello from Docker!" message and exits.
Manage Docker service
To Enable/Disable Docker service (start on boot):
To Start/Stop Docker service:
Important Docker files/folders
Important folders/files: /var/lib/docker/ /etc/docker/key.json /lib/systemd/system/docker.service /lib/systemd/system/docker.socket /lib/systemd/system/containerd.service