Docker (1): Virtualbox Install Centos7 & Docker

Source: Internet
Author: User
Tags docker ps docker hub
This is a creation in Article, where the information may have evolved or changed.

1, about Docker

Docker is an open source project that was born in early 2013 and was originally an amateur project within the DotCloud company. It is based on Google's launch of the Go language implementation. The project later joined the Linux Foundation and complied with the Apache 2.0 protocol, and the project code was maintained on GitHub.

The goal of the Docker project is to implement a lightweight operating system virtualization solution. Docker is based on technologies such as Linux containers (LXC).

On the basis of LXC, Docker has been further encapsulated, so that users do not need to care about the management of containers, making the operation easier. User-operated Docker containers are as simple as operating a fast, lightweight virtual machine.

From
Http://dockerpool.com/static/books/docker_practice/introduction/what.html

2. Installing CentOS

When using VirtualBox installation, the network needs to be modified to "bridged A ' dapter" to facilitate access to the Internet Ip,ssh connected to the virtual machine.
Centos7 can install Docker directly using Yum
The lazy way, just to learn Docker eliminates the hassle of tossing the environment.
It's OK to install directly using the ISO.
You need to be aware of:
CentOS 7 sshd Link is denied issue, Port changed to 2200
Several new features of centos7.0

3. Installing Docker

A direct installation is possible:

yum install golang docker device-mapper-event-libs

Device-mapper-event-libs must be installed or Docker will not start, error: Failed to start Docker application Container Engine.
Configure & Start Services

start docker

The Docker service will start normally.

4,docker Hello World

Virtual installation of a mysql,docker very powerful time image. In the official Search class library very much.
Https://registry.hub.docker.com/search?q=library
Docker's registry, which has a lot of good image libraries.
Installation of MySQL:
/mysql/">https://registry.hub.docker.com//mysql/

Installing the MySQL process, setting up the database Docker-mysql, version 5.5

# docker run --name docker-mysql -e MYSQL_ROOT_PASSWORD=docker-mysql -d mysql:5.5'mysql:5.5'...2f08318d65b3: Pulling dependent layers 511136ea3c5a: Download complete 4f903438061c: Download complete 1265e16d0c28: Download complete ac1d5afd7b69: Download complete 7c89455832dd: Downloading [===========================>                       4.434 MB/8.077 MB 34s

To view the Docker image:

# docker ps -aCONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMESe59ad4702626        mysql:5.5           "/entrypoint.sh mysq   2 minutes ago       Up 2 minutes        3306/tcp            docker-mysql

Check out the MySQL Docker server, log in directly to the MySQL container and install MySQL. At the same time the service also started, testing MySQL docker to boot successfully.
Docker exec-it Docker-mysql Bash

Docker exec-itDocker-mysql bashroot@e59ad4702626:/# Mysql-uroot-pdocker-mysqlWelcome to  theMySQL Monitor. CommandsEnd  with;or\g.your MySQL ConnectionID  is 5Serverversion:5.5.MySQL Community Server (GPL) Copyright (c) -, -, Oracle and/or  itsAffiliates. All rights reserved. Oracle isA registered trademark ofOracle Corporation and/or  itsAffiliates. Names May trademarks ofTheir respectiveowners. Type ' help; 'or' \h ' forHelp. Type ' \c ' toClear theCurrent input statement.mysql> show databases;+--------------------+| Database |+--------------------+| Information_schema | | MySQL | | Performance_schema |+--------------------+3Rowsinch Set(0.00SEC) mysql>

At the same time this is a virtual server, installed on top of MySQL.

Summarize

The fastest way to experience the next Docker, the boot speed is very fast. Through container isolation, the fastest start of the service.
It's very convenient, and the Docker hub has a lot of built-in mirrors that make the environment very convenient.
And then we'll go on to the rest.
This is a good summary, quite comprehensive.
Http://dockerpool.com/static/books/docker_practice/image/pull.html

Other

2015.04.12, participated in the Dockone activities, learning Docker.
This is the day of activity: there is ppt download.
http://dockerone.com/article/305

Related Article

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.