Centos 6.x 升级docker 1.7.1 至 docker 1.13.0
前言随着docker的不断升级,也提供更加丰富的功能,目前Centos6.x默认最新版本仅为Docker version 1.7.1, build 786b29d/1.7.1该版本对于docker的监控功能少之极少,为了方便通过zabbix监控docker服务的性能,以下将docker升级至 1.13.0版本环境操作系统 : centos 6.7docker版本:Do...
前言
随着docker的不断升级,也提供更加丰富的功能,目前Centos6.x默认最新版本仅为 Docker version 1.7.1, build 786b29d/1.7.1
该版本对于docker的监控功能少之极少,为了方便通过zabbix监控docker服务的性能,以下将docker升级至 1.13.0版本
环境
操作系统 : centos 6.7
docker版本:Docker version 1.7.1, build 786b29d/1.7.1
docker升级目前版本:Docker version 1.13.0
相关依赖环境:yum install udev udev-devel device-mapper-libs
预编译包下载地址:https://download.docker.com/linux/static/stable/x86_64/
操作
一、卸载docker服务,卸载之前请将容器及数据进行备份
#> rpm -qa | grep docker
docker-io-1.7.1-2.el6.x86_64
#> rpm -e docker-io-1.7.1-2.el6.x86_64
二、上传新版docker文件
文件下载地址:https://download.docker.com/linux/static/stable/x86_64/
将文件上传服务器进行解压
以下官方安装说明
1、Download the static binary archive. Go to https://download.docker.com/linux/static/stable/ (or change stable to nightly or test), choose your hardware platform, and download the .tgz file relating to the version of Docker Engine - Community you want to install.
2、Extract the archive using the tar utility. The dockerd and docker binaries are extracted.
$ tar xvf /path/to/docker-1.13.0.tgz
3、Optional: Move the binaries to a directory on your executable path, such as /usr/bin/. If you skip this step, you must provide the path to the executable when you invoke docker or dockerd commands.
$ sudo cp docker/* /usr/bin/
4、Start the Docker daemon:
$ sudo dockerd &
If you need to start the daemon with additional options, modify the above command accordingly or create and edit the file /etc/docker/daemon.json to add the custom configuration options.
5、Verify that Docker is installed correctly by running the hello-world image.
$ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
根据以上步骤即可完成操作。
常见问题:
[root@dev141 src]# INFO[0000] libcontainerd: new containerd process, pid: 29287
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
ERRO[0001] devmapper: Udev sync is not supported. This will lead to data loss and unexpected behavior. Install a dynamic binary to use devicemapper or select a different storage driver. For more information, see https://docs.docker.com/engine/reference/commandline/daemon/#daemon-storage-driver-option
ERRO[0001] [graphdriver] prior storage driver "devicemapper" failed: driver not supported
FATA[0001] Error starting daemon: error initializing graphdriver: driver not supported
解决方法:
删掉 /var/lib/docker 文件夹
#> rm -rf /var/lib/docker
重新启动,问题解决!
#> sudo dockerd &
更多推荐
所有评论(0)