The method introduced in Installing docker with ubuntu 20.04 uses the apt repository provided by ubuntu, so the installed version of docker is old. (As of 2021/1/4 Docker version 19.03.8, build afacb8b7f0
)
You can install the latest docker using the method described in Installing docker on ubuntu 19.10 (https://qiita.com/m-tmatma/items/52aea7f73729df6c3411).
However, according to https://manpages.debian.org/unstable/apt/apt-key.8.ja.html
It says apt-key (8) will last be available in Debian 11 and Ubuntu 22.04.
, and the last way to use apt-key
is Ubuntu 22.04
.
A fix has been proposed at https://github.com/docker/docker.github.io/pull/11990 to reflect the method of not using apt-key
in the official docker documentation, and it worked, so I will introduce it. To do.
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/docker-ce-archive-keyring.gpg > /dev/null
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-ce-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
add-apt-repository
is not used, it is not necessary to install software-properties-common
.$ docker --version
Docker version 20.10.1, build 831ebea
Recommended Posts