Docker - 在CentOS7.5中升级Docker版本

1 - 检查当前版本

[[email protected] ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]#
[[email protected] ~]# cat /etc/system-release
CentOS Linux release 7.5.1804 (Core)
[[email protected] ~]#
[[email protected] ~]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-102.git7f2769b.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      7f2769b/1.13.1
 Built:           Mon Aug  5 15:09:42 2019
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-102.git7f2769b.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      7f2769b/1.13.1
 Built:           Mon Aug  5 15:09:42 2019
 OS/Arch:         linux/amd64
 Experimental:    false
[[email protected] ~]# 

2 - 卸载旧版本

[[email protected] ~]# rpm -qa |grep -i docker
docker-1.13.1-102.git7f2769b.el7.centos.x86_64
docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64
docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64
[[email protected] ~]#
[[email protected] ~]# yum remove docker > docker-client > docker-client-latest > docker-common > docker-latest > docker-latest-logrotate > docker-logrotate > docker-engine
Loaded plugins: fastestmirror, langpacks
No Match for argument: docker-client-latest
No Match for argument: docker-latest
No Match for argument: docker-latest-logrotate
No Match for argument: docker-logrotate
No Match for argument: docker-engine
Resolving Dependencies
--> Running transaction check
---> Package docker.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
---> Package docker-client.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
---> Package docker-common.x86_64 2:1.13.1-102.git7f2769b.el7.centos will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package            Arch        Version                                   Repository    Size
=============================================================================================
Removing:
 docker             x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras       65 M
 docker-client      x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras       13 M
 docker-common      x86_64      2:1.13.1-102.git7f2769b.el7.centos        @extras      4.4 k

Transaction Summary
=============================================================================================
Remove  3 Packages

Installed size: 77 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : 2:docker-1.13.1-102.git7f2769b.el7.centos.x86_64                          1/3
warning: /etc/sysconfig/docker-storage saved as /etc/sysconfig/docker-storage.rpmsave
warning: /etc/docker/daemon.json saved as /etc/docker/daemon.json.rpmsave
  Erasing    : 2:docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64                   2/3
  Erasing    : 2:docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64                   3/3
warning: /etc/sysconfig/docker saved as /etc/sysconfig/docker.rpmsave
  Verifying  : 2:docker-client-1.13.1-102.git7f2769b.el7.centos.x86_64                   1/3
  Verifying  : 2:docker-1.13.1-102.git7f2769b.el7.centos.x86_64                          2/3
  Verifying  : 2:docker-common-1.13.1-102.git7f2769b.el7.centos.x86_64                   3/3 

Removed:
  docker.x86_64 2:1.13.1-102.git7f2769b.el7.centos
  docker-client.x86_64 2:1.13.1-102.git7f2769b.el7.centos
  docker-common.x86_64 2:1.13.1-102.git7f2769b.el7.centos                                    

Complete!
[[email protected] ~]# 

3 - 设置仓库

3.1 安装必要的包

[[email protected] ~]# yum install -y yum-utils > device-mapper-persistent-data > lvm2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.far.fi
 * epel: epel.besthosting.ua
 * extras: centos.mirror.far.fi
 * updates: centos.mirror.far.fi
Package device-mapper-persistent-data-0.7.3-3.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package lvm2.x86_64 7:2.02.177-4.el7 will be updated
---> Package lvm2.x86_64 7:2.02.180-10.el7_6.8 will be an update
--> Processing Dependency: lvm2-libs = 7:2.02.180-10.el7_6.8 for package: 7:lvm2-2.02.180-10.el7_6.8.x86_64
---> Package yum-utils.noarch 0:1.1.31-45.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be an update
--> Running transaction check
---> Package lvm2-libs.x86_64 7:2.02.177-4.el7 will be updated
---> Package lvm2-libs.x86_64 7:2.02.180-10.el7_6.8 will be an update
--> Processing Dependency: device-mapper-event = 7:1.02.149-10.el7_6.8 for package: 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-event.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Processing Dependency: device-mapper-event-libs = 7:1.02.149-10.el7_6.8 for package: 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.8 for package: 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.146-4.el7 will be updated
--> Processing Dependency: device-mapper = 7:1.02.146-4.el7 for package: 7:device-mapper-libs-1.02.146-4.el7.x86_64
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.8 will be an update
---> Package device-mapper-event-libs.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-event-libs.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.146-4.el7 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.8 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package                        Arch         Version                     Repository     Size
=============================================================================================
Updating:
 lvm2                           x86_64       7:2.02.180-10.el7_6.8       updates       1.3 M
 yum-utils                      noarch       1.1.31-50.el7               base          121 k
Updating for dependencies:
 device-mapper                  x86_64       7:1.02.149-10.el7_6.8       updates       293 k
 device-mapper-event            x86_64       7:1.02.149-10.el7_6.8       updates       189 k
 device-mapper-event-libs       x86_64       7:1.02.149-10.el7_6.8       updates       188 k
 device-mapper-libs             x86_64       7:1.02.149-10.el7_6.8       updates       321 k
 lvm2-libs                      x86_64       7:2.02.180-10.el7_6.8       updates       1.1 M

Transaction Summary
=============================================================================================
Upgrade  2 Packages (+5 Dependent packages)

Total size: 3.5 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.149-10.el7_6.8.x86_64                               1/14
  Updating   : 7:device-mapper-libs-1.02.149-10.el7_6.8.x86_64                          2/14
  Updating   : 7:device-mapper-event-libs-1.02.149-10.el7_6.8.x86_64                    3/14
  Updating   : 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64                         4/14
  Updating   : 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64                                   5/14
  Updating   : 7:lvm2-2.02.180-10.el7_6.8.x86_64                                        6/14
  Updating   : yum-utils-1.1.31-50.el7.noarch                                           7/14
  Cleanup    : yum-utils-1.1.31-45.el7.noarch                                           8/14
  Cleanup    : 7:lvm2-2.02.177-4.el7.x86_64                                             9/14
  Cleanup    : 7:lvm2-libs-2.02.177-4.el7.x86_64                                       10/14
  Cleanup    : 7:device-mapper-event-1.02.146-4.el7.x86_64                             11/14
  Cleanup    : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64                        12/14
  Cleanup    : 7:device-mapper-1.02.146-4.el7.x86_64                                   13/14
  Cleanup    : 7:device-mapper-libs-1.02.146-4.el7.x86_64                              14/14
  Verifying  : 7:device-mapper-event-1.02.149-10.el7_6.8.x86_64                         1/14
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.8.x86_64                          2/14
  Verifying  : yum-utils-1.1.31-50.el7.noarch                                           3/14
  Verifying  : 7:device-mapper-event-libs-1.02.149-10.el7_6.8.x86_64                    4/14
  Verifying  : 7:lvm2-2.02.180-10.el7_6.8.x86_64                                        5/14
  Verifying  : 7:lvm2-libs-2.02.180-10.el7_6.8.x86_64                                   6/14
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.8.x86_64                               7/14
  Verifying  : 7:device-mapper-1.02.146-4.el7.x86_64                                    8/14
  Verifying  : 7:device-mapper-event-1.02.146-4.el7.x86_64                              9/14
  Verifying  : yum-utils-1.1.31-45.el7.noarch                                          10/14
  Verifying  : 7:device-mapper-event-libs-1.02.146-4.el7.x86_64                        11/14
  Verifying  : 7:lvm2-libs-2.02.177-4.el7.x86_64                                       12/14
  Verifying  : 7:lvm2-2.02.177-4.el7.x86_64                                            13/14
  Verifying  : 7:device-mapper-libs-1.02.146-4.el7.x86_64                              14/14 

Updated:
  lvm2.x86_64 7:2.02.180-10.el7_6.8             yum-utils.noarch 0:1.1.31-50.el7            

Dependency Updated:
  device-mapper.x86_64 7:1.02.149-10.el7_6.8
  device-mapper-event.x86_64 7:1.02.149-10.el7_6.8
  device-mapper-event-libs.x86_64 7:1.02.149-10.el7_6.8
  device-mapper-libs.x86_64 7:1.02.149-10.el7_6.8
  lvm2-libs.x86_64 7:2.02.180-10.el7_6.8                                                     

Complete!
[[email protected] ~]# 

3.2 设置稳定的仓库

[[email protected] ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[[email protected] ~]# 

4 - 安装与配置Docker Engine - Community

4.1 安装最新版本

[[email protected] ~]# yum install docker-ce docker-ce-cli containerd.io
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.far.fi
 * epel: epel.besthosting.ua
 * extras: centos.mirror.far.fi
 * updates: centos.mirror.far.fi
docker-ce-stable                                                      | 3.5 kB  00:00:00
(1/2): docker-ce-stable/x86_64/updateinfo                             |   55 B  00:00:01
(2/2): docker-ce-stable/x86_64/primary_db                             |  32 kB  00:00:01
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.6-3.3.el7 will be installed
---> Package docker-ce.x86_64 3:19.03.1-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package               Arch           Version                 Repository                Size
=============================================================================================
Installing:
 containerd.io         x86_64         1.2.6-3.3.el7           docker-ce-stable          26 M
 docker-ce             x86_64         3:19.03.1-3.el7         docker-ce-stable          24 M
 docker-ce-cli         x86_64         1:19.03.1-3.el7         docker-ce-stable          39 M

Transaction Summary
=============================================================================================
Install  3 Packages

Total download size: 90 M
Installed size: 368 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-19.03.1-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-19.03.1-3.el7.x86_64.rpm is not installed
(1/3): docker-ce-19.03.1-3.el7.x86_64.rpm                             |  24 MB  00:00:34
(2/3): containerd.io-1.2.6-3.3.el7.x86_64.rpm                         |  26 MB  00:00:39
(3/3): docker-ce-cli-19.03.1-3.el7.x86_64.rpm                         |  39 MB  00:00:55
---------------------------------------------------------------------------------------------
Total                                                        1.0 MB/s |  90 MB  00:01:29
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <[email protected]>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : containerd.io-1.2.6-3.3.el7.x86_64                                        1/3
  Installing : 1:docker-ce-cli-19.03.1-3.el7.x86_64                                      2/3
  Installing : 3:docker-ce-19.03.1-3.el7.x86_64                                          3/3
  Verifying  : 1:docker-ce-cli-19.03.1-3.el7.x86_64                                      1/3
  Verifying  : 3:docker-ce-19.03.1-3.el7.x86_64                                          2/3
  Verifying  : containerd.io-1.2.6-3.3.el7.x86_64                                        3/3 

Installed:
  containerd.io.x86_64 0:1.2.6-3.3.el7            docker-ce.x86_64 3:19.03.1-3.el7
  docker-ce-cli.x86_64 1:19.03.1-3.el7           

Complete!
[[email protected] ~]# 

4.2 设置代理

根据网络实际状态来选择是否设置代理。

[[email protected] ~]# mkdir -p /etc/systemd/system/docker.service.d
[[email protected] ~]# vim /etc/systemd/system/docker.service.d/http-proxy.conf
[[email protected] ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.144.1.10:8080/"
Environment="HTTPS_PROXY=http://10.144.1.10:8080/"
[[email protected] ~]# 

4.3 设置国内镜像

通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

[[email protected] ~]# sudo mkdir -p /etc/docker
[[email protected] ~]# sudo tee /etc/docker/daemon.json <<-'EOF'
> {
>   "registry-mirrors": ["https://t5t8q6wn.mirror.aliyuncs.com"]
> }
> EOF
{
  "registry-mirrors": ["https://t5t8q6wn.mirror.aliyuncs.com"]
}

4.4 启动Docker

[[email protected] ~]# systemctl start docker
[[email protected] ~]#
[[email protected] ~]# docker version
Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:21:07 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.1
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.5
  Git commit:       74b1e89
  Built:            Thu Jul 25 21:19:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
[[email protected] ~]# 

4.4 验证是否安装成功

[[email protected] ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[[email protected] ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[[email protected] ~]#
[[email protected] ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
Status: Downloaded newer image for hello-world:latest

Hello 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 the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

[[email protected] ~]#
[[email protected] ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        7 months ago        1.84kB
[[email protected] ~]#
[[email protected] ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
466a14bbfa5b        hello-world         "/hello"            11 seconds ago      Exited (0) 10 seconds ago                       gallant_herschel
[[email protected] ~]#

5 - 问题处理

5.1 问题现象-1

[[email protected] ~]# yum-config-manager > --add-repo > https://download.docker.com/linux/centos/docker-ce.repo
  File "/bin/yum-config-manager", line 135
    except yum.Errors.RepoError, e:
                               ^
SyntaxError: invalid syntax
[[email protected] ~]# 

问题原因与处理方法:

  • 因前期将系统自带python2升级到Python3,导致/bin/yum-config-manager#!/usr/bin/python语句无法生效。
  • 修改为对应内容即可。
[[email protected] ~]# head -n 1 /bin/yum-config-manager
#!/usr/bin/python -tt
[[email protected] ~]#
[[email protected] ~]# python --version
Python 3.7.4
[[email protected] ~]# python2 --version
Python 2.7.5
[[email protected] ~]# ll /usr/bin/ |grep -i python
-rwxr-xr-x.   1 root root       11312 Apr 27  2018 abrt-action-analyze-python
lrwxrwxrwx    1 root root          29 Jul 29 10:14 pip -> /usr/local/python3.7/bin/pip3
-rwxr-xr-x.   1 root root        7280 Apr 13  2018 pmpython
lrwxrwxrwx    1 root root          32 Jul 29 10:14 python -> /usr/local/python3.7/bin/python3
lrwxrwxrwx.   1 root root           9 Nov 16  2018 python2 -> python2.7
-rwxr-xr-x.   1 root root        7216 Apr 11  2018 python2.7
lrwxrwxrwx    1 root root          32 Jul 29 10:14 python3 -> /usr/local/python3.7/bin/pytho3
[[email protected] ~]#
[[email protected] ~]# vim /bin/yum-config-manager
[[email protected] ~]# head -n 1 /bin/yum-config-manager
#!/usr/bin/python2 -tt
[[email protected] ~]# 

5.2 问题现象-2

[[email protected] ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
[[email protected] ~]# 

问题原因与处理方法:

  • 因网络问题导致无法获得镜像文件,通过设置代理来规避此问题。
  • 参考信息:https://github.com/docker/for-win/issues/1534
[[email protected] ~]# mkdir -p /etc/systemd/system/docker.service.d
[[email protected] ~]# vim /etc/systemd/system/docker.service.d/http-proxy.conf
[[email protected] ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.144.1.10:8080/"
Environment="HTTPS_PROXY=http://10.144.1.10:8080/"
[[email protected] ~]#
[[email protected] ~]# systemctl daemon-reload
[[email protected] ~]# systemctl restart docker

5.3 问题现象-3

[[email protected] ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              16.04               2a697363a870        3 months ago        119MB
ubuntu              18.04               7698f282e524        3 months ago        69.9MB
hello-world         latest              fce289e99eb9        7 months ago        1.84kB
[[email protected] ~]#
[[email protected] ~]# docker rmi -f 2a697363a870
Error: No such image: 2a697363a870
[[email protected] ~]#
[[email protected] ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS  

问题原因与处理方法:

  • 推测有残留的镜像信息,删除对应文件即可。
  • 参考信息: https://stackoverflow.com/questions/46381888/docker-images-shows-image-docker-rmi-says-no-such-image-or-reference-doe
[[email protected] ~]# systemctl stop docker
[[email protected] ~]# rm -rf /var/lib/docker
[[email protected] ~]# systemctl start docker
[[email protected] ~]#
[[email protected] ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[[email protected] ~]# 

6 - 参考信息

  • 在CentOS7中安装Docker
  • https://docs.docker.com/
  • https://docs.docker.com/get-started/
  • https://docs.docker.com/install/
  • https://docs.docker.com/install/linux/docker-ce/centos/

原文地址:https://www.cnblogs.com/anliven/p/11366170.html

时间: 2024-11-08 03:10:30

Docker - 在CentOS7.5中升级Docker版本的相关文章

docker实战——在测试中使用Docker

在之前几章中介绍的都是Docker的基础知识,了解什么是镜像,docker基本的启动流程,以及如何去运作一个容器等等. 接下来的几个章节将介绍如何在实际开发和测试过程中使用docker. 将Docker作为本地Web开发环境是使用Docker的一个最简单的场景.这个环境可以完全重现生产环境,保证开发环境和部署环境一致.下面从将Nginx安装到容器来架构一个简单的网站开始. 使用Docker测试静态网站 ## 创建一个sample的镜像目录并创建一个Dockerfile # mkdir sampl

phpStudy中升级MySQL版本到5.7.17的方法步骤

http://www.jb51.net/article/120263.htm 前言 今天在工作发现一个错误,在往本地导数据表的时候老是报错: ? 1 [Err] 1294 - Invalid ON UPDATE clause for '字段名' column 报错的数据表字段: ? 1 `字段名` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP 同事说同一个 sql 文件他可以导成功.猜可能是数据库版本的问题,同事的是 5.6,我查了下本地的数

[linux]centos7.4上升级python2版本到python3.6.5 【安装双版本,默认python3】

版本声明 centos7.4 前言:linux上的python默认是版本2的,之前学django项目用的是3的版本 所以得升级下版本~ 1.下载python3.6.5 cd /usr/local/ wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz tar -xvf Python-3.6.5.tgz 解压后 目录更名为 mv Python-3.6.5 python36 2.安装,目录设置自己解压的 ./configure -

同一个Docker swarm集群中部署多版本的测试环境

先介绍下用到的技术 Docker swarm: Docker官方的集群管理工具,相比kubernetes更加简单,容易入门.https://docs.docker.com/engine/swarm/ Traefik: 一个现代化的反向代理工具,原生支持Docker swarm模式,可以实现swarm的动态代理.https://docs.traefik.io/user-guide/swarm-mode/ 下图展示主要的思路: 在Docker swarm中创建某个测试版本service时,通过设置s

Docker 开篇 1 | 树莓派中搭建Docker

官网三种安装方式,故不再赘述 大部分内容可参考官网链接:https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-ce-1 硬件  树莓派3B  Respbian OS要求 要安装Docker CE,您需要这些Debian或Raspbian版本之一的64位版本: Buster 10 Stretch 9 (stable) / Raspbian Stretch Docker CE在x86_64(或amd64)armh

Docker(一) - CentOS7中安装Docker - (视频教程)

Docker的使用越来越多,安装也相对简单.本文使用视频的方式展示在CentOS7系统中安装Docker,本文更适合于准备入门学习Docker的童靴. 以下视频,请带上耳机开始聆听 (双击全屏播放) 往期教程: .NET开发框架(一)-框架介绍与视频演示 .NET开发框架(二)-框架功能简述 .NET开发框架(三)-高可用服务器端设计 .NET开发框架(四)-服务器IIS实践教程 .NET开发框架(五)-IIS上部署ASP.NET Core项目教程 .NET开发框架(六)-架构设计之IIS负载均

Docker源码分析(二):Docker Client创建与命令执行

1. 前言 如今,Docker作为业界领先的轻量级虚拟化容器管理引擎,给全球开发者提供了一种新颖.便捷的软件集成测试与部署之道.在团队开发软件时,Docker可以提供可复用的运行环境.灵活的资源配置.便捷的集成测试方法以及一键式的部署方式.可以说,Docker的优势在简化持续集成.运维部署方面体现得淋漓尽致,它完全让开发者从持续集成.运维部署方面中解放出来,把精力真正地倾注在开发上. 然而,把Docker的功能发挥到极致,并非一件易事.在深刻理解Docker架构的情况下,熟练掌握Docker C

docker探索-CentOS7中配置Docker的yum源并升级安装docker1.13(十)

此处使用的是CentOS7,内核版本为 [[email protected] ~]# uname -r 3.10.0-327.el7.x86_64 该版本下,配置了yum的源为阿里的镜像源,具体的配置方法可以参见阿里镜像源配置方法 为了方便的安装升级Docker,同时按照Docker官方文档中的方式,配置Docker的yum源,具体参见CentOS docker yum 源配置方法 配置好yum源之后,可以通过yum的list命令,获取可以安装的docker版本 [[email protecte

Kubernetes 集群升级docker版本

Kubernetes 集群升级docker版本 原则:升级完一台正常后再接着升下一台. Work Node 一.迁移上的pod(保证业务,但期间会出现抖动) kubectl drain $NODE --ignore-daemonsets --delete-local-data --force 迁移的过程中如果提示pod无法删除,则需要手动delete. 二.升级docker版本至18.09.9 1.停掉kubelet及docker服务 systemctl stop kubelet systemc