Lv.的博客

Ubuntu22.04 + 阿里云Docker安装及镜像加速

1. docker 安装

1.1 阿里云方式安装(https://developer.aliyun.com/article/110806)

使用官方安装脚本自动安装 (仅适用于公网环境)
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
手动安装帮助 (阿里云ECS可以通过内网安装,见注释部分内容)
Ubuntu 14.04 16.04 (使用apt-get进行安装)

step 1: 安装必要的一些系统工具

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

step 2: 安装GPG证书

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

Step 3: 写入软件源信息

sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

Step 4: 更新并安装 Docker-CE

sudo apt-get -y update
sudo apt-get -y install docker-ce

安装校验

root@iZbp12adskpuoxodbkqzjfZ:$ docker version
Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: false

1.2 使用小鱼一键安装

wget http://fishros.com/install -O fishros && . fishros

2 创建阿里云镜像仓库:

容器镜像服务/实例列表/镜像仓库
docker login --username=*** registry.cn-hangzhou.aliyuncs.com

3 配置阿里云镜像加速:

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
配置镜像加速器
针对Docker客户端版本大于 1.10.0 的用户
您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://×××××××××××.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

4. Mysql WorkBench安装

wget https://downloads.mysql.com/archives/get/p/8/file/mysql-workbench-community-dbgsym_8.0.36-1ubuntu22.04_amd64.deb
posted @ 2024-08-03 11:31  Avatarx  阅读(566)  评论(0编辑  收藏  举报