升级docker至最新版本

1.查找主机上关于Docker的软件包

[root@pre1 ~]# rpm -qa | grep docker

docker-1.13.1-88.git07f3374.el7.centos.x86_64

docker-common-1.13.1-88.git07f3374.el7.centos.x86_64

docker-client-1.13.1-88.git07f3374.el7.centos.x86_64

  

2.使用yum remove卸载软件

[root@pre1 ~]# yum remove -y docker-1.13.1-88.git07f3374.el7.centos.x86_64

[root@pre1 ~]# yum remove –y docker-common-1.13.1-88.git07f3374.el7.centos.x86_64

[root@pre1 ~]# yum remove -y docker-client-1.13.1-88.git07f3374.el7.centos.x86_64

在使用docker命令会提示docker不存在

[root@pre1 ~]# docker version

-bash: /usr/bin/docker: No such file or directory

  

3.使用curl升级到最新版

[root@pre1 ~]# curl -fsSL https://get.docker.com/ | sh

# Executing docker install script, commit: 2f4ae48

+ sh -c 'yum install -y -q yum-utils'

Delta RPMs disabled because /usr/bin/applydeltarpm not installed.

+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'

…

Metadata Cache Created

+ '[' -n '' ']'

+ sh -c 'yum install -y -q docker-ce'

warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-18.09.6-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY

Public key for docker-ce-18.09.6-3.el7.x86_64.rpm is not installed

Importing GPG key 0x621E9F35:

 Userid     : "Docker Release (CE rpm) <docker@docker.com>"

 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35

 From       : https://download.docker.com/linux/centos/gpg

If you would like to use Docker as a non-root user, you should now consider

adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user 

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.

  

4.查看一下安装的版本

[root@pre1 ~]# docker version

Client:

 Version:           18.09.6

 API version:       1.39

 Go version:        go1.10.8

 Git commit:        481bc77156

 Built:             Sat May  4 02:34:58 2019

 OS/Arch:           linux/amd64

 Experimental:      false

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

  

5.启动docker

[root@pre1 ~]# systemctl start docker.service

  

6.加入开机自启动

[root@pre1 ~]# systemctl enable docker

Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

  

7.查看Docker系统信息

[root@pre1 ~]# docker info

Containers: 1

 Running: 0

 Paused: 0

 Stopped: 1

Images: 1

Server Version: 18.09.6

Storage Driver: overlay2

 Backing Filesystem: xfs

 Supports d_type: false

 Native Overlay Diff: false

Logging Driver: json-file

Cgroup Driver: cgroupfs

Plugins:

 Volume: local

 Network: bridge host macvlan null overlay

 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog

Swarm: inactive

Runtimes: runc

Default Runtime: runc

Init Binary: docker-init

containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84

runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30

init version: fec3683

Security Options:

 seccomp

  Profile: default

Kernel Version: 3.10.0-327.el7.x86_64

Operating System: CentOS Linux 7 (Core)

OSType: linux

Architecture: x86_64

CPUs: 2

Total Memory: 7.523GiB

Name: pre1

ID: U5QL:5TI3:SWE7:FR2U:WYOG:D6RX:HHQI:TED3:FT2S:QDW2:VOLL:Z5OT

Docker Root Dir: /var/lib/docker

Debug Mode (client): false

Debug Mode (server): false

Registry: https://index.docker.io/v1/

Labels:

Experimental: false

Insecure Registries:

 127.0.0.0/8

Live Restore Enabled: false

Product License: Community Engine

  

升级docker至最新版本的更多相关文章

  1. centos7 升级内核到最新版本

    centos7 从问世以来,官网提供的镜像始终是3.10 版本,该版本最大的一个问题是对硬件驱动(尤其是无线网卡)的支持不是很好,本人亲测>5种机型,无线网卡均无法正常使用,如果是非主流机型,手 ...

  2. 如何升级centos到最新版本

    本文将教你如何升级centos到最新版本.centos中“update”命令可以一次性更新所有软件到最新版本.注意:不推荐使用update的y选项,-y选项会让你在安装每项更新前都进行确认(译者注:这 ...

  3. CentOS如何升级openssl到最新版本

    本文不再更新,可能存在内容过时的情况,实时更新请移步原文地址:CentOS如何升级openssl到最新版本: 环境信息 CentOS Linux release 7.6.1810 (Core): Op ...

  4. 使用docker搭建最新版本的gitea,并配置HTTPS访问

    使用docker搭建最新版本的gitea,并配置HTTPS访问 博客说明 文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢! 简介 之前有搭建 ...

  5. WebMisSharp升级说明,最新版本1.6.0

    尊敬的C3 AM.C3 FX.WebMisSharp用户您好: 非常感谢长期来您对WebMisSharp系列产品的支持,您的使用和反馈是我们进步的最大动力.在你们的帮助下我们又向前迈进了一步,我们功能 ...

  6. MAC 上升级python为最新版本

    第1步:下载Python3.4 下载地址如下: 下载Mac OS X 64-bit/32-bit installer https://www.python.org/downloads/release/ ...

  7. 升级openssh到最新版本

    首先,下载最新版本,传到服务器:http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/ 安装 cd /root/ mkdir ssh_upg ...

  8. 如何在Centos7下升级Apache至最新版本

    Apache是使用最广泛的应用部署软件.并且它也是所有服务器的必要组成部分.安装最新版本的apache意味着拥有更多最新的功能和修复了已知的BUG. 介绍 在这篇教程里面,我将会介绍在Centos7下 ...

  9. Mac下升级ruby至最新版本

    Mac自身的ruby 版本 2.x,通过ruby -v可以查看版本号. 为更新到ruby的最新版本,可通过以下命令解决: brew update brew install ruby 执行完命令后,ru ...

随机推荐

  1. Bugku 杂项 隐写

    隐写 下载后打开压缩包发现是一张图片 用winhex打开 图中红色框内是PNG的PE头 在IHDR后面的八个字节(黄色框部分)为该图片的长度.宽度信息 将黄色框内最后一个字节由A4改为F4后另存为图片 ...

  2. HDU 6616 Divide the Stones

    目录 题面 中文题意 比赛惨状 我的走不通的思路 \(m\)是偶数的情况 \(m\)是奇数的情况 题解的思路 另一些思路 源代码 题面 Time limit 3000 ms Memory limit ...

  3. LUOGU P2569 [SCOI2010]股票交易(单调队列优化dp)

    传送门 解题思路 不难想一个\(O(n^3)\)的\(dp\),设\(f_{i,j}\)表示第\(i\)天,手上有\(j\)股的最大收益,因为这个\(dp\)具有单调性,所以\(f_i\)可以贪心的直 ...

  4. AC自动机再加强版

    AC自动机 拓扑排序优化,注意拓扑排序前要把所有入度为零的点都加进去 #include<bits/stdc++.h> using namespace std; #define maxn 1 ...

  5. linux/Unix下的vim/vi指令的使用方法

    概述 以下这篇文章介绍的是关于vim的使用方法,由于我本身对linux没有太多的研究,写下的这篇文章纯属是在实际中经常使用vim指令,想通过这篇文章记录下来,方便以后使用时查找方便.个人认为,对于普通 ...

  6. Spring定时器Quartz

    <bean id="startQuertz" lazy-init="false" autowire="no" class=" ...

  7. lunwenzhunbei

    1,android sensors introduction http://developer.android.com/guide/topics/sensors/sensors_overview.ht ...

  8. shell 中使用正则表达式

    ls | xargs echo | sed 's/.*\(\w\+\)\s\(\w\+\s\)*\1d.*/\1/' 说明 \w\+表示一段连续的字符串 \s\+ 一个或者多个空格 \s* 0个或者多 ...

  9. Extending Widgets with the Widget Factory

    https://learn.jquery.com/jquery-ui/widget-factory/extending-widgets/ 实例 https://github.com/tkvw/jQue ...

  10. Log4net记录日志到本地或数据库

    OperatorLog /****** Object: Table [dbo].[OperatorLog] Script Date: SET ANSI_NULLS ON GO SET QUOTED_I ...