ubuntu虚拟机安装docker 成功实践记录


docker 安装

1. 首先移除老的docker版本

sudo apt-get remove docker docker-engine docker.io containerd runc

2. apt 更新

sudo apt-get update

 若出现GPG error: https://www.rabbitmq.com/debian testing InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B73A36E6026DFCA错误,使用以下步骤解决

sudo apt-get clean
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 696DBE66A72D76DA
sudo apt update
sudo apt-get update

3.安装ca HTTPS等依赖

 sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

4. 添加docker gpg key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5.安装docker

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

 然后就完成安装了

完成后可以 使用命令

sudo docker run hello-world 

测试一下是否成功

  

 

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM