当前位置: 首页 > news >正文

linux CentOS7配置docker的yum源并安装

@[TOC](这里写目录标题

  • 配置yum源
  • Docker的自动化安装
    • 一些其他启动相关的命令:

配置yum源

使用以下命令下载CentOS官方的yum源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清除yum缓存
yum clean all
更新yum缓存
yum makecache
测试新的yum源
yum list

Docker的自动化安装

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
Docker启动
systemctl start docker
通过运行hello-world镜像来验证是否正确安装了Docker Engine-Community。
拉取镜像
sudo docker pull hello-world
执行hello-world
sudo docker run hello-world

[root@localhost mm]# docker run hello-worldHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal............................

一些其他启动相关的命令:

守护进程重启:systemctl daemon-reload
重启Docker服务:systemctl restart docker / service docker restart
关闭Docker服务:docker service docker stop / docker systemctl stop docker

http://www.lryc.cn/news/333594.html

相关文章:

  • vue结合Elempent-Plus/UI穿梭框更改宽度以及悬浮文本显示
  • 汇川PLC学习Day4:电机参数和气缸控制参数
  • 数据可视化高级技术Echarts(快速上手柱状图进阶操作)
  • 【数据结构与算法】力扣 206. 反转链表
  • 【随笔】Git 高级篇 -- 本地栈式提交 rebase | cherry-pick(十七)
  • 数据结构-- 基于顺序表的通讯录代码讲解
  • qt-C++笔记之QLabel加载图片
  • Unity中UI系统1——GUI
  • GIt 删除某个特定commit
  • Django --静态文件
  • 蓝桥杯第十三届省赛C++B组(未完)
  • 编程生活day7--明明的随机数、6翻了、吃火锅
  • css酷炫边框
  • 使用 Docker 部署 Photopea 在线 PS 工具
  • 回溯法(一)——全排列 全组合 子集问题
  • 【Pt】马灯贴图绘制过程 04-玻璃脏迹
  • Rust 程序设计语言学习——枚举模式匹配
  • 正则表达式(1)
  • nginx + keepalived 搭建教程
  • React事件和原生事件的执行顺序
  • 为什么在计算查询Q和键K的矩阵乘法时需要转置键矩阵K。示例说明q11,k11代表什么。线性变换矩阵 W_q 用于生成查询,W_k 用于生成键怎么获取的。
  • 剑指Offer题目笔记27(动态规划单序列问题)
  • 撸代码时,有哪些习惯一定要坚持?
  • 【leetcode面试经典150题】17.罗马数字转整数(C++)
  • 前后端开发之——文章分类管理
  • 第12届蓝桥杯省赛 ---- C/C++ C组
  • IVS模型解释
  • 通用开发技能系列:Git
  • 最新怎么订阅OnlyFans上喜欢的博主,详细教程
  • Mysql故障和优化