当前位置:首页 > linux运维 > 正文内容

docker 安装

14324472931年前 (2024-07-29)linux运维1136

1.卸载旧版docker

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2.运行环境安装
通过如下命令进行运行环境的安装包:

yum install -y yum-utils

3.配置下载Docker的yum源

#国外的地址
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo 
    
# 设置阿里云的Docker镜像仓库
yum-config-manager \
    --add-repo \
    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

4.更新yum软件包索引

yum makecache fast

5.安装Docker引擎

yum install docker-ce docker-ce-cli containerd.io

6.如果过程中一直报差找不到镜像,用该命令清理下yum包:

yum clean all

7.启动docker

systemctl start docker
# 查看当前版本号,是否启动成功
docker version
# 设置开机自启动
systemctl enable docker

扫描二维码推送至手机访问。

版权声明:本文由爱开发博客发布,如需转载请注明出处。

本文链接:https://www.lovekf.cn/?id=28

标签: Docker
分享给朋友:

“docker 安装” 的相关文章

自建dns服务器

自建dns服务器:项目来源:AdguardTeam/AdGuardHome: Network-wide ads & trackers blocking DNS server (github.com)我建立的DNS:1.15.64.27:53特点:本dns服务器主要解决的是DNS污染问题,顺便...

自建内网穿透服务器-基于Docker的FRP内网穿透部署

创建配置文件# 创建存放目录 sudo mkdir /etc/frp # 创建frps.ini文件 vim /etc/frp/frps.tomlfrps.toml文件配置内容[common] # 监听端口 bind_port&nb...

aria2配置文件和bt-tracker定期更新脚本

# # https://github.com/P3TERX/aria2.conf # File name:aria2.conf # Description: Awesome Aria2 configuration file # Version: 2021.09.15 # # Copyri...

CentOS优化手册

1. 调整 journal 存储设置( 解决systemd 或者 systemd-journald 进程占用大量 CPU 或内存资源的情况)编辑 /etc/systemd/journald.conf 文件,并更改 Storage 参数。例如,将其从 persistent 改为 volatile 或...

nginx 和frp共存端口转发规则

server { listen 80; listen [::]:80; # 同时监听 IPv6 server_name *.lovekf.cn; # 匹配所有子域名 location / { proxy_pass http://127.0...

云豹直播搭建过程中node聊天接口无法使用的修复方案

1.云豹node服务原始依赖于http协议,目前浏览器已经不支持http和https混合使用,所以需要为node.js支持https. 解决思路如下: 1.使用nginx进行端口转发,将域名转发至云豹的node.js端口19967端口。2.如何更新ssl证书(宝塔创建一个站点,域名为聊天服务器地...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。