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!" 就说明运行成功了

相关推荐
Avan_菜菜1 小时前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
程序员老赵2 小时前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)
docker·容器·ai编程
WangMingHua1116 小时前
LM Studio Docker 部署——本地大模型一键启动
docker
SelectDB1 天前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
曲幽1 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了
python·docker·web·pot·translate·libretranslate·arogstranslate
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220703 天前
如何搭建本地yum源(上)
运维
武子康3 天前
调查研究-183 Apple container:Mac 上用轻量 VM 跑 Linux 容器,Swift 会改写本地容器体验吗?
docker·容器·apple
大树886 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
摇滚侠6 天前
Linux CentOS7 rpm 安装 MySQL 5.7
linux·运维·mysql