Tencent OS 3.1 如何安装 Docker 并开启信息隔离
source link: https://www.ixiqin.com/2021/12/tencent-os-3-1-how-to-install-the-docker/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Tencent OS 3.1 如何安装 Docker 并开启信息隔离
我最近在将主机从阿里云迁移到我的老东家腾讯云。
由于对于 Ubuntu/Debian/CentOS 用烦了,想试点新东西,就使用了腾讯云自带的 Tencent OS Linux 3.1 来配置环境。
和标准的发行版相比,Tencent OS Linux 针对 Docker 进行了定向的优化,因此,便刚好试一试腾讯的优化。
腾讯针对标准版 Docker 优化,来源
如果你想要享受对应的优化,则需要定向安装腾讯云提供的 Docker 软件,具体安装方法也很简单,执行如下两行代码即可。
yum -y install tencentos-release-docker-ce
yum -y install docker-ce
如何开启信息隔离
根据官方文档说明,只需要执行如下代码即可完成信息隔离的开启:
sysctl -w kernel.stats_isolated=1
配置腾讯云 Docker 镜像
Docker 官方镜像在海外,在国内下载的速度体验一直不佳,在这种情况下,可以考虑配置腾讯云官方的内网镜像,提升镜像下载速度。
cat << EOF > /etc/docker/daemon.json
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com"
]
}
EOF
执行完成后,再执行 systemctl restart docker
来重启 docker 即可使用镜像。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK