In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to upgrade Docker on the Linux server". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to upgrade Docker on the Linux server".
Docker, a popular open source container platform for packaging software, has a new version 1.6 with many new features. This version mainly updates Docker Registry, Engine, Swarm, Compose and Machine. This release aims to improve performance and improve the experience of developers and system administrators. Let's take a quick look at the new features.
Docker Registry (2. 0), a service that pushes Docker images for storage and sharing, has undergone architectural changes because of the experience under load. It is still backward compatible. The writing language of Docker Registry has now been changed from Python to Google's Go language to improve performance. Combined with Docker Engine 1.6, the ability to pull images is faster. Previously, mirrors were transported in queues, but now they are parallel.
Docker Engine (1. 6) is a big improvement over the previous version. Currently, container and image tags are supported. Through tags, you can attach user-defined metadata to images and containers, which in turn can be used by other tools. Tags are invisible to running applications and can be used to speed up search containers and images.
The Windows version of the Docker client can connect to a remote Docker Engine running on linux.
Docker currently supports log-driven API, which allows us to send container logs to systems such as Syslog or third parties. This will benefit the system administrator.
Swarm is a Docker clustering tool that converts a pool of Docker hosts into a virtual host. In the new features, containers are even placed on available nodes. Try to support full Docker API by adding more Docker commands. In the future, it will be possible to use third-party drivers to cluster.
Compose (1. 2), a tool for defining and running complex applications in Docker, has also been upgraded. In the new version, you can create multiple sub-files instead of describing a multi-container application with an unstructured file.
With Machine, we can easily build Docker hosts on local computers, clouds, and data centers. The new release provides a relatively clean driver interface for developers to write drivers. Machine centrally controls the supply, rather than each independent driver. New commands have been added that can be used to generate TLS certificates for hosts to improve security.
Upgrade guidance on Fedora / CentOS
In this section, we will learn how to upgrade existing docker to the latest version on Fedora and CentOS. Note that the current Docker only runs on a 64-bit architecture, Fedora and CentOS are both derived from RedHat, and the use of commands is pretty much the same, except that the Docker package is called "docker-io" in Fedora20 and CentOS6.5.
If you have not previously installed Docker on your system, use the following command to install:
"yum install docker-io"-on Fedora20 / CentOS6.5
"yum install docker"-on Fedora21 / CentOS7
It's a good idea to back up docker images and container volumes before upgrading.
Refer to "packing a file system into tar packages" and "Volume backup, restore, or Migration" for more information.
Currently, Docker1.5 is installed in the test system. The sample output shows that it is from a Fedora20 system.
Verify the Docker version of the current system installation
The code is as follows:
[root@TestNode1] # sudo docker-v
Docker version 1.5.0, build a8a31ef/1.5.0
If Docker is running, stop it first.
The code is as follows:
[root@TestNode1 ~] # sudo systemctl stop docker
Use yum update to upgrade to the latest version, but at the time of writing, the repository is not the latest version (1.6), so you need to use the binary upgrade method.
The code is as follows:
[root@TestNode1 ~] # sudo yum-y update docker-io
No packages marked for update
[root@TestNode1 ~] # sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest-O / usr/bin/docker
-- 2015-04-19 13, 40, 14, 40, 14, 48, https://get.docker.com/builds/Linux/x86_64/docker-latest
Resolving get.docker.com (get.docker.com)... 162.242.195.82
Connecting to get.docker.com (get.docker.com) | 162.242.195.82 |: 443. Connected.
HTTP request sent, awaiting response... 200 OK
Length: 15443598 (15m) [binary/octet-stream]
Saving to: / usr/bin/docker
15443598 8.72MB/s in 1.7s
2015-04-19 13:40:50 (8.72 MB/s)-/ usr/bin/docker saved
Check the updated version
The code is as follows:
[root@TestNode1] # sudo docker-v
Docker version 1.6.0, build 4749651
Restart the docker service
The code is as follows:
[root@TestNode1 ~] # sudo systemctl start docker
Confirm that Docker is running
The code is as follows:
[root@TestNode1 ~] # docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
Fedora latest 834629358fe2 3 months ago 241.3 MB
[root@TestNode1 ~] # docker run fedora / bin/echo Hello World
Hello World
Note when installing CentOS. After installing Docker on CentOS, you may get an error message when you try to start the Docker service, as shown below:
The code is as follows:
Docker.service-Docker Application Container Engine
Loaded: loaded (/ usr/lib/systemd/system/docker.service; disabled)
Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago
Docs: http://docs.docker.com
Process: 21069 ExecStart=/usr/bin/docker-d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127)
Main PID: 21069 (code=exited, status=127)
Apr 20 03:24:24 centos7 systemd [1]: Starting Docker Application Container E.
Apr 20 03:24:24 centos7 docker [21069]: time= "2015-04-20T03:24:24-04:00" lev...)
Apr 20 03:24:24 centos7 docker [21069]: time= "2015-04-20T03:24:24-04:00" lev...)
Apr 20 03:24:24 centos7 docker [21069]: / usr/bin/docker: relocation error: /... ce
Apr 20 03:24:24 centos7 systemd [1]: docker.service: main process exited, co.../a
Apr 20 03:24:24 centos7 systemd [1]: Failed to start Docker Application Cont...e.
Apr 20 03:24:24 centos7 systemd [1]: Unit docker.service entered failed state.
This is a known bug (https://bugzilla.redhat.com/show_bug.cgi?id=1207839) and the device mapping needs to be upgraded to the latest.
The code is as follows:
[root@centos7 ~] # rpm-qa device-mapper
Device-mapper-1.02.84-14.el7.x86_64
[root@centos7 ~] # yum update device-mapper
[root@centos7 ~] # rpm-qa device-mapper
Device-mapper-1.02.93-3.el7.x86_64
[root@centos7 ~] # systemctl start docker
Summary
Although docker technology has not been around for long, it soon became very popular. It makes the life of developers easier, and the operation and maintenance team can create and deploy applications quickly and independently. Through the release of the company, the rapid update of Docker, the improvement of product quality, to meet the needs of users, the future is bright for Docker.
Thank you for your reading, the above is the content of "how to upgrade Docker on the Linux server". After the study of this article, I believe you have a deeper understanding of how to upgrade Docker on the Linux server, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.