首页 > 系统相关 >Ubuntu22.04 安装Docker

Ubuntu22.04 安装Docker

时间:2022-10-14 11:03:15浏览次数:83  
标签:加速器 com Ubuntu22.04 sudo apt https docker 安装 Docker

Ubuntu22.04 安装Docker_docker


1、安装需要的软件依赖包

sudo apt-get install apt-transport-https ca-certificates software-properties-common curl -y


2、添加中国科技大学GPG密钥和Docker-ce源

$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

$ sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \

$(lsb_release -cs) stable" ## 此次会提示回车确认即可

$ sudo apt-get update

3、安装Docker-ce

$ sudo apt install docker-ce -y


4、验证Docker安装

docker version
docker run hello-world

Ubuntu22.04 安装Docker_linux_02

Ubuntu22.04 安装Docker_ubuntu_03

5、配置当前用户加入docker用户组(可选)

sudo usermod -aG docker 用户名

要切换或推出当前账户再登录才生效!!!

6、配置国内Docker镜像加速

(1)国内加速器地址

(2)配置镜像加速

  • 创建/etc/docker/daemon.json文件(默认不存在)
  • 添加以下内容,注意json格式的缩进问题,以逗号结尾,最后一行不需要逗号。

{

"registry-mirrors": [

"https://ung2thfc.mirror.aliyuncs.com",

"https://registry.docker-cn.com",

"http://hub-mirror.c.163.com",

"https://docker.mirrors.ustc.edu.cn"

]

}

(3)重新加载并重启Docker

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

(4)查看部署情况是否成功

docker info 
查看 Registry Mirrors 是否部署成功

Ubuntu22.04 安装Docker_linux_04

标签:加速器,com,Ubuntu22.04,sudo,apt,https,docker,安装,Docker
From: https://blog.51cto.com/u_13298188/5755751

相关文章

  • SHFB-Sandcastle Help File Build vs文档生成工具安装及配置
    SHFB-SandcastleHelpFileBuildvs文档生成工具安装及配置1该软件使用较简单,列出重要步骤,部分省略2软件安装2.2.1安装包SHFBGuidedInstaller_2014.5.31.0.zip......
  • shell 脚本安装docker服务
    本次安装:docker-20.10.9.tgz安装包下载地址:https://download.docker.com/linux/static/stable/x86_64/docker-20.10.9.tgz 1、创建文件夹mkdir-p/data/docker/data......
  • Redis简介,安装测试redis,常用操作数据库命令
    Redis是什么Redis:REmoteDIctionaryServer(远程字典服务器)是完全开源免费的,用C语言编写的,遵守BSD协议,是一个高性能的(Key/Value)分布式内存数据库,基于内存运行,并支持持久......
  • docker desktop url protocl 技术以及使用
    dockerdesktop在登录的使用使用了自定义的url协议,同时基于web进行系统登录,认证完成之后会生成code,之后通过url协议进入使用docker协议定义 <arra......
  • python:backgroundremover安装及运行中报错的处理(backgroundremover 0.1.9)
    一,安装backgroundremover:1,官方站地址:https://github.com/nadermx/backgroundremover2,从命令行安装[lhdop@blog~]$pip3installbackgroundremover3,安装......
  • linux 安装mysql8.0.11
    1.使用系统的root账户2.切换到/use/local目录下3.下载mysql?wgethttps://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.21-linux-glibc2.12-x86_64.tar.xz也可以......
  • Linux 安装 helm
    下载helm压缩包,地址  https://github.com/helm/helm/releases/tag/v3.10.1选择适合自己操作系统的包  上传解压安装1root@calico-master01:~#rz2Sent-......
  • 二.安装ifconfig命令
    二.安装ifconfig命令1、ifconfig命令是设置或显示网络接口的程序,可以显示出我们机器的网卡信息,可是有些时候最小化安装CentOS等Linux发行版的时候会默认不安装ifconfig等......
  • K8S and Rancher安装
    ========节点1===============================安装dockersudoyuminstall-yyum-utilsdevice-mapper-persistent-datalvm2sudoyum-config-manager--add-repohttp:/......
  • Windows 安装 MySQL 5.7 x64 位
    下载地址:https://downloads.mysql.com/archives/installer/安装网站上只有x86没有x64位,之前下了x64的zip包,配置比较麻烦,其实这个x86包里面,已经包含了x64的包......