首页 > 其他分享 >安装docker

安装docker

时间:2023-06-16 09:58:21浏览次数:49  
标签:mirrors com ce etc yum docker 安装

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
yum install wget jq psmisc vim net-tools telnet yum-utils device-mapper-persistent-data lvm2 git -y

yum install docker-ce-20.10.* docker-ce-cli-20.10.* -y
由于新版Kubelet建议使用systemd,所以把Docker的CgroupDriver也改成systemd:
# mkdir /etc/docker
# cat > /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
所有节点设置开机自启动Docker:
# systemctl daemon-reload && systemctl enable --now docker

标签:mirrors,com,ce,etc,yum,docker,安装
From: https://www.cnblogs.com/zwli/p/17484805.html

相关文章

  • IPMItool安装后出现找不到libfreeipmi.so.17库文件问题
    描述:IPMItool安装后出现找不到libfreeipmi.so.17库文件问题解决:通过find查找libfreeipmi.so.17文件,设置环境变量:exportLD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH(单次生效) 永久生效 ......
  • Linux下的Jenkins安装教程
    sudowget-O/etc/yum.repos.d/jenkins.repohttps://pkg.jenkins.io/redhat-stable/jenkins.repo--no-check-certificatesudorpm--importhttps://pkg.jenkins.io/redhat-stable/jenkins.io.key通过yum安装Jenkinsyum-yinstalljenkinsJenkins默认端口号为8080,输入vim......
  • Docker命令精简
    以下内容按照上文图示进行展开,此文适合懂得Docker概念的一些同学,所以对对应的用法不做过多的介绍。docker仓库地址:https://hub-stage.docker.com/基础命令#显示docker的基本信息dockerversion#系统信息,镜像和容器的数量dockerinfo镜像镜像拉取:dockerpull ......
  • Linux环境下JDK安装
    安装JDK将JDK导入opt目录下面的software文件夹解压JDK到/opt/module目录下tar-zxvfjdk-8u144-linux-x64.tar.gz-C/opt/module/配置JDK环境变量获取jdk路径[[email protected]_144]$pwd/opt/module/jdk1.8.0_144打开/etc/profile文件vim/etc/......
  • ubuntu安装python3.8.3
    1.打开终端,更新软件包列表:sudoaptupdate2.安装编译Python所需的构建工具和库:sudoaptinstallbuild-essentiallibssl-devzlib1g-devlibncurses5-devlibncursesw5-devlibreadline-devlibsqlite3-devlibgdbm-devlibdb5.3-devlibbz2-devlibexpat1-devliblzma-dev......
  • qt6 在线安装
    Qt6在线安装下载安装工具:https://download.qt.io/official_releases/online_installers/安装,使用国内源提升下载速度。./qt-unified-windows-x64-4.6.0-online.exe--mirrorhttps://mirror.nju.edu.cn/qt......
  • pyppeteer服务器部署依赖安装
    centos#依赖库yuminstallpango.x86_64libXcomposite.x86_64libXcursor.x86_64libXdamage.x86_64libXext.x86_64libXi.x86_64libXtst.x86_64cups-libs.x86_64libXScrnSaver.x86_64libXrandr.x86_64GConf2.x86_64alsa-lib.x86_64atk.x86_64gtk3.x86_64nss.x86_64-......
  • 二进制安装Tomcat
    注意:安装tomcat前必须先部署JDK[root@centos8~]#wgethttp://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.50/bin/apache-tomcat-8.5.50.tar.gz[root@centos8~]#wgethttps://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.88/bin/apache-tomc......
  • Docker镜像制作
    commitbuild-t将现有容器通过dockercommit手动构建镜像基于容器手动制作镜像步骤dockercommit格式dockercommit[OPTIONS]CONTAINER[REPOSITORY[:TAG]]#选项-a,--authorstringAuthor(e.g.,"JohnHannibalSmith<hannibal@ateam.com>")-c,--changelist......
  • 二进制安装ZABBIX-server
    #wgethttps://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4+ubuntu22.04_all.deb#dpkg-izabbix-release_6.0-4+ubuntu22.04_all.deb#aptupdate安装Zabbixserver,Web前端,agent#aptinstallzabbix-server-mysqlzabbix-fron......