当前位置:网站首页>【无标题】菜市场
【无标题】菜市场
2022-08-06 02:45:00 【青 nihq】
文章目录
前言
| 前面一篇文章介绍到了Docker的基本概念,包括什么是镜像,什么是容器,什么是 仓库,并对比了Docker与传统虚拟机的优劣。今天在前面的基础之上进行实际操做,安装Docker并配置其阿里云镜像,操作比较简单,大佬绕道,小白不喜勿喷。 |

安装docker 前置条件
安装yum(没有安装yum的话需要自己下载依赖包)
yum是基于RPM包管理,能够自动解决依赖关系。极大地方便rpm包的安装升级。
测试并运行一个实例
安装命令
yum install docker -y
安装结果
如果成功的话最后会输出 完毕!(这里是已经安装过了)
建立一个容器
docker run -d -p 80:80 httpd
如果遇到这种情况是因为没有启动docker,所以报错了需要先启动Docker
启动docker服务
systemctl start docker
然后拉取镜像并执行

配置阿里云镜像
先去访问阿里云官网注册账号
剩下的操作步骤如下:
第一步
打开控制台
第二步
打开产品目录
第三步
选择容器镜像服务,创建个人实例
第四步
选择镜像加速器,并进行配置
第五步(以下方式二选一)
️️直接复制黏贴
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://sopniyqv.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
️️分步创建
mkdir -p /etc/docker
vim /etc/docker/daemon.json
然后在daemon.json中输入json数据
#阿里云
{
"registry-mirrors": ["https://{自已的编码}.mirror.aliyuncs.com"]
}
重启服务器
systemctl daemon-reload
systemctl restart docker
边栏推荐
- 软件工程-大学体育馆管理系统交互图
- 数据治理:走出数据孤岛
- Decoding problem of serial communication between STM32 and K210 (based on punctual atomic source code)
- linux下mysql cpu占用过高问题查找思路
- 方法区、永久代、元空间
- 拦截器通过自定义注解来判断是否拦截
- MySQL high-performance construction 1: Centos7+Mysql7.5 builds master-slave replication
- SprinBoot集成JWT实现token验证拦截
- 二次开发入门须知
- 查找链表第N个节点
猜你喜欢

Use MySQL to intercept JSON string, the result is null

如何改变WooCommerce的默认数量

从采集到存储:时序数据库到底怎么处理时间?

95年的测试员,什么也不会敢要12K~看着他的简历思绪万千...

js_数组对象改属性名

3个云渲染平台的价格体系,哪个最合适(四)

Software Engineering - University Gymnasium Management System Class Diagram

leetcode linked list oj question

A tester in 1995, he wouldn't dare to ask for 12K~ Looking at his resume, I have a lot of thoughts...

读书笔记 如何阅读一本书
随机推荐
WPF 截图控件之移除控件(九)「仿微信」
Detailed description of hand-eye calibration (introduction of coordinate system, two-dimensional, three-dimensional hand-eye calibration method @ nine-point method, AX=XB)
测试工程师应该具备什么能力才能拿到30k?
在滑动间隔缓存中对磁盘带宽的要求高最坏情况是什么?
codeforces 4A.watermelon
Online Question Feedback Module Actual Combat (20): Realize the function of batch exporting files to zip archives
6种可改善软件的可用性测试方法
比亚迪7月份销量爆表,产品结构非常合理
[机缘参悟-61]:《兵者,诡道也》-3-孙子兵法解读-敌战计
How did Soul, who submitted a prospectus to the Hong Kong Stock Exchange, capture the hearts of thousands of Generation Z with the social metaverse?
[深入研究4G/5G/6G专题-45]: L3信令控制-1-软件功能和整体架构
mysql 高性能搭建1: Centos7+Mysql7.5搭建主从复制
1320_STM32F103使用串口烧写程序
如何在PPT制作象型图
【NOI模拟赛】独家墙(数位DP)
MVCC interview questions
大咖说*计算讲谈社|AI 的价值探索:如何拓展商业边界?
Soul向港交所递交上市申请,持续发力社交元宇宙赛道
Camera calibration > > coordinate system transformation @ inside and outside the cords
What skills should a test engineer have to get 30k?




