gis+= Geographic Information + Container technology (3)--docker Installation and mirroring management __ Containers | Docker

Source: Internet
Author: User
Tags docker hub



QQ Group: 16403743

Purpose: Focus on the "gis+" cutting-edge technology research and exchange, the cloud computing technology, large data technology, container technology, IoT and GIS in-depth integration, explore the "gis+" technology and industry solutions

Reprint Note: The article is allowed to reprint, but must be linked to the source address, otherwise held legal responsibility!


Docker Installation

Because I test the operating system for Ubuntu14.04, for the operating system, you can directly from the Ubuntu source to install the Docker program, the following specific operations

$sudo apt-get update
$sudo apt-get install-y
$sudo ln-sf/usr/bin/
   $sudo sed-i ' $acomplete-F _docker Docker '/etc/bash_completion.d/

However, if you want to install the latest version of the Docker program, you may need to update different sources, the latest Docker version is 1.9, the following actions

$sudo apt-get Install Apt-transport-https
$sudo apt-key adv--keyserver hkp:// 36a1d7869245c8950f966e92d8576a8ba8
$sudo bash-c "Echo Deb Https:// Docker main >/etc/apt/ Sources.list.d/docker.list "
$sudo apt-get update
$sudo apt-get install Lxc-docker

Relatively speaking, Docker installation compares other OpenStack, Hadoop, spark relatively simple.

Mirroring Management

Linux FS in Docker

For traditional Linux, when we start this operating system, we usually set the Linux rootfs to read-only, then check its integrity, and then set the Rootfs to writable, so that we can operate on the Linux operating system.

Docker when the container is started, the ROOTFS is also set to ReadOnly, and then the AUFS is mounted on readwrite by Rootfs, and the lower FS is set to ReadOnly, which makes up a complete OS.

• For each layer of ReadOnly FS, called image (such as the above Debian or busybox)
• Read-write on top of FS, called container
• For the content of the ReadOnly modification, using the cow (Copyon Write) technology, copy the file to the Read-wirte layer and modify, the actual user sees the current container layer of files, image files will not be affected

• In addition to baseimage, each layer of image has a parent image (for example, Debian, (debian+emaces))
• A mirror without parentimage is called base image (for example, kernal)
• Cow based technology, the image part is not modified, so container can share the image layer of FS, improve storage efficiency
How to get a mirror
In general, we can obtain from Docker official warehouse, of course, China also has more well-known Docker mirror source, such as Daocloud or Ling que cloud. This is similar to whether we download software from the official Ubuntu source or download it from Ali or 163 sources.

Docker the official offer to share the image: Https://
The June 2015 cloud Computing Conference in Beijing, which was not familiar with container technology at the time, was also privileged to hear a speech from Daocloud founder Chen Ziyan and founder Zoo Yue of Docker, an EMC (formerly Oracle), One from Microsoft (which is responsible for the development of the Windows Server 2016 container section), is a cow.


Lark Cloud:

Query Mirroring

We can use the Docker command directly from the OS to query the relevant mirror information.

For example, let's look at the container mirroring of Hadoop.

Download Mirror

Now that we can query mirroring, we can download the relevant mirrors locally to use, for example, we can download a mirror of the Ubuntu12.04 operating system.

If the download does not specify tag, will be all mirror-related tags download down, about tag, please continue to see the following introduction.

In general, this operation may cause a different wait time due to network, mirror size. So it is recommended to download targeted.

root@controller:/etc/bash_completion.d# sudo docker pull ubuntu:12.04
12.04:pulling from Library/ubuntu
Ce049369478e:pull Complete
2ec1b169061f:pulling FS layer 9bbaf44a8a7c:download complete 38f2c35e1b51
: Download complete
Pulling repository 0ac5b09d8536:download
Be10ee96620d:download Complete
5e59ab480134:download complete
efbb515ae632:download complete
Status: Downloaded newer image for ubuntu:12.04 image is pulled from legacy.  Important:this registry version'll is supported in future versions of Docker.

mirroring name and version management

After the mirror download is complete, we can display the mirror list information by using the following command.

root@controller:~/sinatra# Docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
Ubuntu              14.04               1d073211c498        2 weeks ago         187.9 MB
ubuntu              14.04.3             1d073211c498        2 Weeks ago         187.9 mb
ubuntu              12.04               0ac5b09d8536        2 weeks ago         136.1 MB
<none>              <none>              ce049369478e        2 weeks ago         135.9 MB
training/sinatra    latest              f0f4ab557f95        months ago       447 MB

Name specification for normal mirrors {Namespace}/{repositoryname}:{tag}

namespace is Dockerhub's username, and time plays a namespace role.

Repository, similar to GitHub projects, such as MySQL

tag, which represents version information, optional, default latest, such as cesc/mysql:5.6

Uploading Mirrors
In general, we can use the following four steps to upload the mirror we do well

Dockerlogin, log in to the Docker hub

• Convert container through dockercommit commands to image

• Name the newly generated image by Dockertag

Dockerpush to the Docker hub.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.