CentOS7安装docker小记

  1. 首先你得需要有一个虚拟机,我的配置如图:
  2. 安装docker的工具

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

  1. 指定阿里云的仓库

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

  1. 更新仓库源信息

sudo yum makecache fast

  1. 从阿里云镜像上下载docker

sudo yum -y install docker-ce


  1. docker服务化

sudo service docker start

  1. 启动服务

service docker start

  1. 看一下docker是否启动成功

docker version

  1. 从镜像中拿来hello-world

docker pull hello-world

  1. 运行一下

docker run hello-world

当出现 "Hello from Docker!" 就说明运行成功了

相关推荐
穷人小水滴10 小时前
用容器编译 VirtualBox 虚拟机软件 (ArchLinux, podman)
linux·容器·virtualbox
EatFans11 小时前
Docker 实战部署:从本地镜像到云服务器,一篇走通 FastAPI + Celery + MySQL + Redis + Nginx
docker·fastapi
judezh11 小时前
api 容器一直 unhealthy?我把一个 Agent 运行时的健康检查逐条拆了,查出四个问题
运维·docker
暗不需求11 小时前
Docker 入门:从「光盘与 DVD」到全栈项目容器化实战
docker·容器·面试
春天花会开13111 小时前
内网 HTTPS 部署实战:私有 CA + Nginx 反向代理全流程复盘
运维·nginx·https
AllFiles11 小时前
K8s Node Exporter 异常 Write 超时排查实录
运维·后端·kubernetes
探索云原生11 小时前
一个 Deployment 就能跑 vLLM,为什么还需要 KServe?
docker·ai·云原生·kubernetes·go
虎头金猫6 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
分布式存储与RustFS6 天前
MinIO 官方 Docker 镜像被移除:依赖它的项目该怎么办
docker·云原生·devops·对象存储·minio·分布式存储
AI职业加油站6 天前
AI智能体应用工程师证书:政策红利下的职业新风口
大数据·运维·人工智能·学习·职场发展