Docker Introductory Tutorial (i) Introduction

Source: Internet
Author: User
Tags how to install docker on ubuntu docker run

Http://dockone.io/article/101

Docker Introductory Tutorial (i) Introduction to "editor's words" dockerone organization translated FLUX7 's Docker starter tutorial, this is the first of a series of introductory tutorials that describes the basic concepts of Docker and the installation of Docker.

Docker is a new containerized technology, it is lightweight and portable, known as "build once, configure once and run Anywhere" (Translator Note: This is not translated, the taste is not translated) ". This article is the first part of the FLUX7 Docker series tutorial. Learn and understand the advantages of Docker with this tutorial, and how to use it better.

Let's study Docker together.

This article focuses on the basics of Docker: Docker features, ideas, and how to install and use Docker.
Docker features Docker has a lot of interesting features that you will be able to understand better through this tutorial. The features of Docker mainly include the following points:
    • Fast and elegant isolation frame
    • Cheap
    • cpu/low consumption of memory
    • Quick turn on/off
    • Cross-Cloud infrastructure

Docker components and elements Docker has three components and three basic elements, and the reader can quickly navigate through the following video to see what these builds and elements are and how they relate to each other. Each of the three components is:
    • Docker ClientIs the user interface, which supports Docker Daemon communication between users.
    • Docker DaemonRuns on the host and processes the service request.
    • Docker Indexis a central registry that supports backups of Docker container images that have public and private access rights.

The three basic elements are:
    • Docker ContainersResponsible for the operation of the application, including the operating system, user-added files, and meta-data.
    • Docker Imagesis a read-only template that is used to run the Docker container.
    • DockerFileis a file instruction set that describes how to create a docker image automatically.



Before discussing how Docker components interact with basic features, let's talk about the pillars of Docker. Docker uses the following operating system features to improve container technology efficiency:
    • NamespacesActs as the first level of isolation. Ensure that a process is running in one container and cannot see or affect other processes outside the container.
    • Control Groupsis an important part of LXC and has the key function of resource accounting and restriction.
    • UnionFS(file system) as a building block of a container. To support the lightweight and fast nature of Docker, it creates a user layer.

How to put them together to run any application requires two basic steps:
    1. Build a mirror.
    2. Run the container.

These steps are all from Docker Clientcommand to start. Docker ClientYou are using a Docker binary file. On a basic level, Docker Client'll tell Docker DaemonThe image that needs to be created and the commands that need to be run inside the container. When the daemon receives a signal to create the image, the following actions are performed:
1th Step: Build the image as described earlier, Docker Imageis a read-only template for a build container that contains all the information needed to start a container, including running programs and configuration data.
Each image originates from a basic image and then creates a template based on the instructions in Dockerfile. For each instruction, create a new layer on the mirror.

Once the mirrors have been created, they can be pushed to the Central registry: Docker IndexFor others to use. However Docker IndexProvides two levels of access to mirroring: Public access and private access. You can store the images in a private warehouse, and the Docker website has a private warehouse package for you to choose from. In summary, public warehouses are searchable and reusable, and private warehouses can only be used by members with access rights. Docker Clientcan be used to Docker IndexWithin the image search.
2nd step: Running the container runs the container from the image we created in the first step. When the container is started, a read-write layer is added to the top layer of the mirror. When the appropriate network and IP addresses are assigned, the required applications can be run in the container.

If you still do not understand, do not worry, in the next content we will share with you a lot of practical cases.

So far, we've introduced the basic concept of Docker, and next, let's install docker!
Installing Docker: Quick Guide below Let's look at how to install Docker on Ubuntu 12.04 LTS (Note: The CentOS 6.5 installation can refer here):
    1. Check the HTTPS compatibility of the APT system. If the Usr/lib/apt/methods/https file does not exist, install the apt-transport-https package.
    2. Add the Docker repositor key locally. Repository key:hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba88d21e9
    3. Add Docker repository to apt source list.
    4. Install the Lxc-docker package.sudo apt-get update sudo apt-get install lxc-docker
    5. Verify the content that is installed.sudo docker run -i -t ubuntu /bin/bash

Docker Introductory Tutorial (i) Introduction

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: info-contact@alibabacloud.com 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.