docker--环境搭建
2024-10-07 16:38:11
我的电脑是win10,虽然现在win10开始也支持docker,但在linux机器会合适些,所以我先用VMware创建一个linux虚拟机--Centos7
安装虚拟机不多说,现在开始安装docker
1、删除docker(如果有的话)
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
2、安装一些系统必要的工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
3、获取docker的yum源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
4、更新yum缓存
yum makecache fast
5、安装docker
yum -y install docker-ce
6、启动docker
systemctl start docker
7、测试运行
docker run hello-world
8、由于是学习用,所以我还安装一些工具
yum install -y git vim gcc glibc-static telnet bridge-utils net-tools
9、查看本地拥有的image,hello world是第七步运行image时下载的。
[root@localhost ~]# docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest fce289e99eb9 months ago .84kB
[root@localhost ~]#
image说明如下,bootfs是内核,在上面有不同的base image,也就是各种发行版,Centos、Ubuntu、Debian等,在base image上可以安装软件(eg apache)构成新的image#2,在image#2上安装mysql可以构成新的image#4,
image#4 和image2可以共享相同的layer,也就是base image。
最新文章
- 用scikit-learn学习K-Means聚类
- JS获取地址栏参数的方法
- CentOS 6 安装 MySQL-python
- ssh(sturts2_spring_hibernate) 框架搭建之JPA代替hibernate
- log4j配置文件详解
- BZOJ 2080: [Poi2010]Railway 双栈排序
- fibonacci数列的和取余(1)
- HDU 1695 GCD (莫比乌斯反演)
- OSG addEventHandler W键 L键 F键
- 【Inno Setup】 Inno Setup 64位安装程序默认安装路径
- coconHashMap实现原理分析
- 临时和永久修改oracle sysdate的默认输出格式
- javacript 组合使用构造函数模式和原型模式
- 20160224.CCPP体系详解(0034天)
- AndroidStudio制作欢迎界面与应用图标
- Linux-nmon系统性能监控工具的使用及报表产出
- Ubuntu 16.04 不能用inittab 设置 运行等级 runlevel
- FastDFS配置 ***
- MUI音乐播放html5+audio模块
- calcite介绍