Docket Learning--docker Getting Started

Source: Internet
Author: User
Tags using git docker hub

What is Docker?

Docker is an open-source engine that makes it easy to create a lightweight, portable, self-sufficient container for any application. Developers who compile tests on notebooks can be deployed in batches in a production environment, including VMS (virtual machines), bare metal, OpenStack clusters, and other underlying application platforms.

Docker is typically used for the following scenarios:
    • Automated packaging and publishing of Web applications;
    • Automated testing and continuous integration, release;
    • Deploy and tune databases or other back-end applications in a service-oriented environment;
    • Build your own PAAs environment by compiling from scratch or by extending your existing OpenShift or cloud foundry platform.
Benefits of Docker:

As a lightweight virtualization approach, Docker has a significant advantage over the traditional virtual machine approach in running applications:

    • Docker containers quickly, start-up and stop can be implemented in seconds, which is much faster than traditional virtual machines.
    • Docker containers require very little system resources, and you can run thousands of Docker containers at the same time on a single host.
    • Docker uses git-like operations to make it easy for users to get, distribute, and update application images, with concise instructions and lower learning costs.
    • Docker supports flexible, automated creation and deployment mechanisms through the Dockerfile configuration file to increase productivity.
Installing a Linux installation on Docker
Curl-ssl Https://get.daocloud.io/docker | Sh

This installation package is for most major Linux distributions, such as Ubuntu,debian,centos, and the Daocloud backend synchronizes Docker official resources every 3 hours to ensure that the latest Docker installation files are available the first time.

You can also install the experience or beta version to experience the latest Docker.

Curl-ssl Https://get.daocloud.io/docker-experimental |  -ssl Https://get.daocloud.io/docker-test | Sh

CentOS7 under Yum Installation:

sudo yum updatesudo yum install Docker

Official documents:

https://docs.docker.com/engine/installation/linux/centos/

Http://docs.daocloud.io/faq/install-docker-daocloud

When the installation is complete, view the Docker version

Docker version

Output:

client:version:       1.12.3 API version:  1.24 Go version:   go1. 6.3 Git Commit:   6b644ec Built:         OS/arch:      linux/amd64server:version:      1.12.3 API version:   1.24 Go version:   go1. 6.3 Git Commit:   6b644ec Built:         OS/arch:      linux/amd64

To start the Docker daemon:

Service Docker start

Docker Warehouse

Docker manages mirroring using Git-like methods. A basic image allows you to customize the Docker images that are created for different kinds of applications. The Docker hub is the center of the image that Docker is officially providing. It is easy to find images of various applications and environments here. Because Docker uses a federated file system, mirroring is layered like a sandwich cookie, and the same underlying image can be shared. So Docker is still pretty much disk-space-efficient. To use a mirror, you need to pull from the remote image registry first, which is very similar to git.

Docker pull Ubuntu

Docker container

One of the most critical steps in using Docker is to create a container from the image. There are two ways to create a container: Create a container with the Docker create command, or run a new container with the Docker run command. The two commands are not very different, except that they do not start the container immediately after they are created.

Docket Learning--docker Getting Started

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.