docker 1.13以及新特性
发布日期:2021-06-30 20:24:04
浏览次数:3
分类:技术文章
本文共 8015 字,大约阅读时间需要 26 分钟。
docker1.12发布之后时隔好久才迎来2016年docker第二个最重要的版本的发布. 在这篇文章之中我们将一起看一下有哪些特性的增强并来简单体验一下.
主要变更
docker 1.13修复了很多过去的bug,同时也添加了很多新的特性,列举一些主要变化,如下:
项番 | 详细信息 |
---|---|
No.1 | plugin相关功能不再是试验功能,正式发布 |
No.2 | 增加了docker system相关辅助功能 |
No.3 | 增加了docker secret相关辅助功能 |
No.4 | 增加了清除无用网络/Volume等相关的prune辅助功能 |
No.5 | docker build时添加步数提示信息 |
No.6 | docker build中添加–network参数支持 |
No.7 | 添加了支持VMware Photon OS的RPM |
No.8 | 添加了–shutdown-timeout或者–stop-timeout为停止提供超时设定 |
No.9 | 增强了swarm mode的安全管理以及很多功能的强化比如docker node ps添加-a选项,docker service create添加–dns等 |
No.10 | …… |
影响
基于本次更新主要以功能增强和bug修正为主,所以对之前版本的影响不是很大。
比如弃用的仅仅为docker daemon命令弃用或者docker pull的repo:shortid语法弃用这样影响较小的部分。 另外plugin功能的正式发布会带来一点影响。如果你在docker1.12中使用了plugin相关的试验性功能,你需要先行删除你的那些plugin以及/var/lib/docker/plugins/下的json文件,等docker版本更新之后再重新安装。试验性的功能还是有一些变化的风险性的。安装前提
假定为centos7.2为宿主OS,之前如果安装有低版本的docker,最好先行删除,同时container-selinux和docker-common也一并删除。
另外linux内核需要在3.10以上,OS应该为64位。[root@liumiaocn ~]# uname -r3.10.0-327.el7.x86_64[root@liumiaocn ~]# getconf LONG_BIT64[root@liumiaocn ~]#
安装
安装yum-utils
[root@liumiaocn ~]# yum install -y yum-utilsLoaded plugins: fastestmirror, langpacksDetermining fastest mirrors * base: mirrors.btte.net * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comPackage yum-utils-1.1.31-40.el7.noarch already installed and latest versionNothing to do[root@liumiaocn ~]# 已经安装
设定yum-config-manager
[root@liumiaocn ~]# yum-config-manager \> --add-repo \> https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repoLoaded plugins: fastestmirror, langpacksadding repo from: https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repograbbing file https://docs.docker.com/engine/installation/linux/repo_files/centos/docker.repo to /etc/yum.repos.d/docker.reporepo saved to /etc/yum.repos.d/docker.repo[root@liumiaocn ~]#
更新yum的package索引
[root@liumiaocn ~]# yum makecache fastLoaded plugins: fastestmirror, langpacksbase | 3.6 kB 00:00:00docker-main | 2.9 kB 00:00:00epel/x86_64/metalink | 4.6 kB 00:00:00extras | 3.4 kB 00:00:00updates | 3.4 kB 00:00:00docker-main/primary_db | 28 kB 00:00:02Loading mirror speeds from cached hostfile * base: mirrors.btte.net * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comMetadata Cache Created[root@liumiaocn ~]#
安装docker-engine
[root@liumiaocn ~]# rpm -e docker-common-1.10.3-59.el7.centos.x86_64[root@liumiaocn ~]#[root@liumiaocn ~]#[root@liumiaocn ~]# yum -y docker-engineLoaded plugins: fastestmirror, langpacksNo such command: docker-engine. Please use /usr/bin/yum --help[root@liumiaocn ~]# yum -y install docker-engineLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.btte.net * epel: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package docker-engine.x86_64 0:1.13.0-1.el7.centos will be installed--> Processing Dependency: docker-engine-selinux >= 1.13.0-1.el7.centos for package: docker-engine-1.13.0-1.el7.centos.x86_64--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-engine-1.13.0-1.el7.centos.x86_64--> Running transaction check---> Package docker-engine-selinux.noarch 0:1.13.0-1.el7.centos will be installed---> Package libtool-ltdl.x86_64 0:2.4.2-21.el7_2 will be installed--> Finished Dependency ResolutionDependencies Resolved=================================================================================================================================================== Package Arch Version Repository Size===================================================================================================================================================Installing: docker-engine x86_64 1.13.0-1.el7.centos docker-main 19 MInstalling for dependencies: docker-engine-selinux noarch 1.13.0-1.el7.centos docker-main 28 k libtool-ltdl x86_64 2.4.2-21.el7_2 base 49 kTransaction Summary===================================================================================================================================================Install 1 Package (+2 Dependent packages)Total size: 19 MInstalled size: 65 MDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transactionWarning: RPMDB altered outside of yum. Installing : docker-engine-selinux-1.13.0-1.el7.centos.noarch 1/3 Installing : libtool-ltdl-2.4.2-21.el7_2.x86_64 2/3 Installing : docker-engine-1.13.0-1.el7.centos.x86_64 3/3 Verifying : libtool-ltdl-2.4.2-21.el7_2.x86_64 1/3 Verifying : docker-engine-selinux-1.13.0-1.el7.centos.noarch 2/3 Verifying : docker-engine-1.13.0-1.el7.centos.x86_64 3/3Installed: docker-engine.x86_64 0:1.13.0-1.el7.centosDependency Installed: docker-engine-selinux.noarch 0:1.13.0-1.el7.centos libtool-ltdl.x86_64 0:2.4.2-21.el7_2Complete![root@liumiaocn ~]#
启动docker
[root@liumiaocn ~]# systemctl enable docker; systemctl start docker;Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.[root@liumiaocn ~]#
确认版本
[root@liumiaocn ~]# docker versionClient: Version: 1.13.0 API version: 1.25 Go version: go1.7.3 Git commit: 49bf474 Built: Tue Jan 17 09:55:28 2017 OS/Arch: linux/amd64Server: Version: 1.13.0 API version: 1.25 (minimum version 1.12) Go version: go1.7.3 Git commit: 49bf474 Built: Tue Jan 17 09:55:28 2017 OS/Arch: linux/amd64 Experimental: false[root@liumiaocn ~]#
新增功能
docker新添加的特性的使用方法,比如docker system:
[root@liumiaocn ~]# docker systemUsage: docker system COMMANDManage DockerOptions: --help Print usageCommands: df Show docker disk usage events Get real time events from the server info Display system-wide information prune Remove unused dataRun 'docker system COMMAND --help' for more information on a command.[root@liumiaocn ~]#
docker secret:
[root@liumiaocn ~]# docker secretUsage: docker secret COMMANDManage Docker secretsOptions: --help Print usageCommands: create Create a secret from a file or STDIN as content inspect Display detailed information on one or more secrets ls List secrets rm Remove one or more secretsRun 'docker secret COMMAND --help' for more information on a command.[root@liumiaocn ~]#
总结
这篇文章中一起看了一下docker1.13中有哪些新的特性以及如何在centos上进行安装。详细的使用在后面的文章中将会进一步展开。
转载地址:https://liumiaocn.blog.csdn.net/article/details/54783302 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年04月24日 03时32分32秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
【超越白皮书7】你需要知道关于ETH2.0的几个事实
2019-04-30
AMM做市无常损失对冲分析系列(一)—— 损益及期权对冲模型构建
2019-04-30
【python练习题】遍历1
2019-04-30
对于时间复杂度的通俗理解
2019-04-30
如何输入多组数据并输出每组数据的和?
2019-04-30
基于CentOS 7的Linux常用命令行命令
2019-04-30
行阶梯型矩阵
2019-04-30
matlab中uint8,double,im2double和im2uint8的区别
2019-04-30
SVM进行人脸检测
2019-04-30
C++学习笔记
2019-04-30
图像处理学习笔记
2019-04-30
Machine Learning Onramp on MATLAB 学习笔记
2019-04-30
Machine Learning with MATLAB 1.1 to 2.2
2019-04-30
Learning DSP with MATLAB
2019-04-30
用MATLAB实现m序列的生成(MATLAB 2021a适用)
2019-04-30
MATLAB函数备忘(定期更新)
2019-04-30
13行MATLAB代码实现网络爬虫 爬取NASA画廊星图
2019-04-30
MATLAB指定路径保存图片方法
2019-04-30
Python一键获取微信推送封面图
2019-04-30
油猴脚本:微信推送浏览功能拓展
2019-04-30