Installing Docker on Ubuntu Hosts
Quick navigational links:
This taken from Docker’s instructions for installing Docker
apt-get remove docker docker-engine docker.io containerd runc
Update the apt package index and install packages to allow apt to use a repository over HTTPS:
- Add Docker’s GPG key:
- Generate and add the apt repo artifact for your architecture:
- amd64
- Instructions
echo "deb [arch=amd64 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
- armhf
- Instructions
echo "deb [arch=armhf 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
- arm64
- Instructions
echo "deb [arch=arm64 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
Update the apt package index, and install the latest version of Docker Engine and containerd,
if you wish to be pedantic:
|
|
To install a specific version of Docker Engine, list the available versions in the repo, then select and install:
a. List the versions available in your repo:
|
|
b. Install a specific version using the version string from the second column, for example
|
|
Custom tweaks
- /etc/docker/daemon.json
{ "log-driver": "journald" }
in conjunction with a /etc/systemd/journald.conf
config like so: