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

相关推荐
广州灵眸科技有限公司5 小时前
瑞芯微(EASY EAI)RV1126B 核心板供电电路
linux·运维·服务器·单片机·嵌入式硬件·电脑
keyipatience5 小时前
18.Linux进程退出和进程等待机制详解
linux·运维·服务器
仙柒4156 小时前
控制平面组件和节点组件
运维·容器·kubernetes
齐齐大魔王6 小时前
Linux-网络编程实战
linux·运维·网络
wanhengidc7 小时前
私有云的作用都有哪些?
运维·服务器·网络·游戏·智能手机
花阴偷移7 小时前
Ubuntu 22.04版本下配置静态IP
linux·运维·服务器·tcp/ip·ubuntu
牛马十年8 小时前
当自动化运维系统被ai重构后
运维·人工智能·自动化
Niliuershangba8 小时前
Docker Desktop 部署 ChestnutCMS 全流程:从零搭建企业级 CMS 开发环境
运维·docker·容器