A Record of Some Commands Needed for Server Migration

A Record of Some Commands Needed for Server Migration

💡 原文英文,约100词,阅读约需1分钟。
📝

内容提要

本文简要介绍了在Ubuntu系统上安装Docker的步骤,包括更新软件包、安装证书、下载GPG密钥和配置Docker源。

🎯

关键要点

  • 更新软件包:使用命令 sudo apt-get update
  • 安装证书:使用命令 sudo apt-get install ca-certificates curl -y
  • 创建密钥环目录:使用命令 sudo install -m 0755 -d /etc/apt/keyrings
  • 下载GPG密钥:使用命令 sudo curl -fsSL https://mirrors.cloud.tencent.com/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
  • 设置GPG密钥权限:使用命令 sudo chmod a+r /etc/apt/keyrings/docker.asc
  • 配置Docker源:使用命令 echo 'deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.cloud.tencent.com/docker-ce/linux/ubuntu/ $(. /etc/os-release && echo "$VERSION_CODENAME") stable' | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • 再次更新软件包:使用命令 sudo apt-get update
➡️

继续阅读