1、卸载旧版本
apt-get remove docker docker-engine docker.io containerd runc

2、安装前提依赖
apt update
apt-get install ca-certificates curl gnupg lsb-release


3、安装GPG证书
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

4、写入软件源信息
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

5、安装新版本
apt-get install docker-ce docker-ce-cli containerd.io

6、用户组相关(这步比较重要,否则后续查看docker版本的时候会有报错提示并且也无法启动docker:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version": dial unix /var/run/docker.sock: connect: permission denied)

sudo groupadd docker       #添加docker用户组
sudo gpasswd -a XXX docker     #将当前用户添加至docker用户组,其中XXX为用户名
newgrp docker       #更新docker用户组

7、启动docker

systemctl start docker

docker version(查看docker版本)

8、安装必要工具

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

9、配置 docker

# 添加 docker 配置 /etc/docker/daemon.json(需要在目录下自行添加daemon.json)
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
 "registry-mirrors": ["https://hub-mirror.c.163.com","https://gxeo3yz7.mirror.aliyuncs.com"]
}

10、重启docker

service docker restart

posted @ 2022-08-16 15:48 老子不服 阅读(2671) 评论(0) 推荐(0) 编辑
摘要: using (var cnn = GetConnection(connStr)) { var cmd = cnn.CreateCommand("SELECT DISTINCT ReceiverMobile from crm.Tag_Teacher limit 20000"); var dr=cmd. 阅读全文
posted @ 2020-03-20 09:03 老子不服 阅读(1249) 评论(1) 推荐(0) 编辑
摘要: https://blog.csdn.net/mynamepg/article/details/81044957 这篇参考 批量插入mysql,发现使用mysql自带的uuid函数生成的uuid会重复。 原因是mysql字符集有问题,应该都改成utf8,修改方式是改my.ini配置 mysql8.0中 阅读全文
posted @ 2020-03-09 22:18 老子不服 阅读(2916) 评论(0) 推荐(0) 编辑
摘要: 在webvr.xml里删除这个layer<layer name="webvr_setupbutton" keep="true" vr="true" style="webvr_button_style" html="VR Setup" align="bottom" y="24" autoalpha=" 阅读全文
posted @ 2020-02-10 16:17 老子不服 阅读(367) 评论(0) 推荐(0) 编辑
摘要: krpano version="1.19" pr161、在tour.xml里加入<plugin name="soundinterface" url.flash="%SWFPATH%/plugins/soundinterface.swf" url.html5="%SWFPATH%/plugins/so 阅读全文
posted @ 2020-02-10 16:16 老子不服 阅读(927) 评论(0) 推荐(0) 编辑
摘要: 在vtour/plugins/webvr.xml里加入以下代码<action name="entervr" autorun="onstart" device="mobile">delayedcall(2.0,webvr.enterVR());</action> 阅读全文
posted @ 2020-02-10 16:14 老子不服 阅读(985) 评论(0) 推荐(0) 编辑
摘要: 运行:free -m,可查询物理内存大小和swap空间大小,swap空间通常应为物理内存两倍大。增加swap空间步骤:1、dd if=/dev/zero of=/home/swap bs=1024 count=5120000这样就会创建/home/swap分区文件。文件的大小是512000个bloc 阅读全文
posted @ 2020-02-10 16:11 老子不服 阅读(3109) 评论(0) 推荐(0) 编辑
摘要: 1、创建/etc/apt/sources.list.d/clickhouse.list文件, 2、在clickhouse.list文件里写入deb http://repo.yandex.ru /clickhouse/deb/stable/ main/ 3、一定要在clickhouse.list文件的 阅读全文
posted @ 2020-02-10 16:07 老子不服 阅读(3980) 评论(1) 推荐(1) 编辑
摘要: 由于本人失误,没有修改clickhouse的默认数据目录,导致把数据保存到了系统盘,现在系统盘空间不够,决定移动到数据盘,步骤如下:原目录:/var/lib/clickhouse目标目录:/test/clickhouse1、复制数据cp /var/lib/clickhouse/data -r /te 阅读全文
posted @ 2020-02-10 16:01 老子不服 阅读(3096) 评论(0) 推荐(2) 编辑
摘要: 时隔七年,来一篇 阅读全文
posted @ 2016-11-11 13:23 老子不服 阅读(114) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示