![当涉及 gpg 文件时,升级 Docker 的正确方法是什么?](https://linux22.com/image/1199263/%E5%BD%93%E6%B6%89%E5%8F%8A%20gpg%20%E6%96%87%E4%BB%B6%E6%97%B6%EF%BC%8C%E5%8D%87%E7%BA%A7%20Docker%20%E7%9A%84%E6%AD%A3%E7%A1%AE%E6%96%B9%E6%B3%95%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F.png)
在通过 VirtualBox 将 Ubuntu Desktop 20.04 升级到 22.04 之后focal
-jammy
在/etc/apt/sources.list.d
目录中存在该mysql.list
文件。
根据研究表明打开该文件并将从更改为local
。jammy
因此我现在有
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ jammy mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ jammy mysql-8.0
manueljordan@mac2013-vb143:/etc/apt/sources.list.d$
现在/etc/apt/sources.list.d
目录中存在如下docker.list
文件docker.list.distUpgrade
cat docker.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable
cat docker.list.distUpgrade
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable
是的,/etc/apt/keyrings/docker.gpg
文件存在
当涉及 gpg 文件时,升级 Docker 的正确方法是什么?
答案1
在版本升级期间,为了调整第三方存储库,有时您需要更改版本代号。但您无需更改 gpg 密钥。
如果 gpg 密钥已更改,apt
将发出警告。您必须覆盖旧密钥。例如:(docker gpg key)
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg