Docker
(Link)[https://docs.docker.com/engine/install/ubuntu/]
(Link)[https://docs.docker.com/engine/install/ubuntu/]
bash
# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt updatebash
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginbash
sudo systemctl status dockerbash
sudo systemctl start docker#Optional: Run Docker Without SudoBy default, Docker commands require root level privileges (sudo). If you want to run Docker commands as a non-root user, add your current account to the Docker user group:
bash
sudo usermod -aG docker ${USER}text
newgrp docker
Create group: sudo groupadd docker
Assign user: sudo usermod -aG docker $USER
Refresh session: newgrp docker
Verify function: docker run hello-world(link)[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04] (Githug)[https://github.com/joseeden/All-Things-Docker-and-Kubernetes/blob/master/pages/01-Pre-requisites/labs-docker-pre-requisites/05-Using-Docker-without-Root-permissions.md]
linux/ubuntu/docker.md
Related articles
- LinuxIdentify Your Network Interface & SubnetLocate Your Netplan Config File
- LinuxRetrieve and Execute the Installation ScriptInstall Node.js and npm Verify the Installation
- LinuxStep 1: Download the Go 1.26 TarballStep 2: Extract the Toolchain Step 3: Configure Environment Variables
- LinuxTo change date time of current time zoneTo change date time of current time zone — notes from the Linux collection.