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

相关推荐
lwx9148525 小时前
Linux-特殊权限SUID,SGID,SBIT
linux·运维·服务器
炘爚7 小时前
深入解析printf缓冲区与fork进程复制机制
linux·运维·算法
workflower7 小时前
注塑机行业目前自动化现状分析
运维·人工智能·语言模型·自动化·集成测试·软件工程·软件需求
小义_8 小时前
随笔 3(Linux)
linux·运维·服务器·云原生·红帽
杨浦老苏8 小时前
开源的AI编程工作站HolyClaude
人工智能·docker·ai·编辑器·开发·群晖
#六脉神剑8 小时前
MySQL参数调优:十个关键参数助力数据库性能数倍提升
运维·mysql
cccccc语言我来了8 小时前
Linux(10)进程概念
linux·运维·服务器
伐尘8 小时前
【linux】查看空间(内存、磁盘、文件目录、分区)的几个命令
linux·运维·网络
倔强的胖蚂蚁9 小时前
x2openEuler 辅助机完整部署教程
运维·云原生
原来是猿9 小时前
Linux进程信号详解(二):信号产生
linux·运维·服务器