Docker Build Ubuntu+mysql Environment tutorial

Source: Internet
Author: User
Tags gpg docker run

Docker is an open-source application container engine that allows developers to package their

Application and dependency packages into a portable container, and then publish to any popular

Virtualization can also be implemented on Linux machines. Containers are completely using the sandbox mechanism,

There will be no interfaces to each other.

Experiment Objective: using Docker in centos6.5 to get a preliminary understanding of the Docker creation process,

Create Ubuntu and MySQL images

and publish it and test it to experience how Docker works

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/06/02/wKiom1mvxDjwBrICAAA0ez_6jgQ573.jpg-wh_500x0-wm_ 3-wmp_4-s_4013516259.jpg "title=" u=2331555423,3710225953&fm=27&gp=0.jpg "alt=" wKiom1mvxDjwBrICAAA0ez_ 6jgq573.jpg-wh_50 "/>

One: to view the current Linux kernel version, Docker requires kernel 3. X

Uname-a View the kernel version if it is less than 3. x need to upgrade kernel

Kernel Upgrade Method:

1. Import Public key

RPM--import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

2, install Elrepo to the core of 2.6.32 CentOS

RPM-UVH http://www.elrepo.org/elrepo-release-6-8.el6.

elrepo.noarch.rpm

3. Install KERNEL-LT (long term support) version

Yum--enablerepo=elrepo-kernel Install Kernel-lt-y

4. Edit the grub.conf file and modify the Grub boot order

Vim/etc/grub.conf

Adjust the value of default to the order of the new kernel, such as the newly installed kernel in this upgrade case

Position is 0, so change default to 0, save exit

5. Check the kernel after rebooting the system

Two: Installing Docker

1 RPM-IVH http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6

-8.noarch.rpm

2 rpm--import/etc/pki/rpm-gpg/rpm-gpg-key-epel-6

3 yum-y Install Device-mapper The docker process will die

4 yum-y Install Docker-io installing Docker

5 Service Docker start start Docker service

Three: Get a docker image

Docker pull Ubuntu

Docker pull MySQL

domestic public network get image image slow, available git get

git clone https://git.oschina.net/dockerf/

Docker-training.git//contains only common image

Four: Run test images

View images mirrored Docker images

Ubuntu Docker run-it Ubuntu/bin/bash

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/06/02/wKiom1mvxI-hOddWAATBCuuqwz4817.png-wh_500x0-wm_ 3-wmp_4-s_3184163698.png "title=" CentOS 64-bit -2017-09-06-17-48-25.png "alt=" Wkiom1mvxi-hoddwaatbcuuqwz4817.png-wh_ "/>

Cat/etc/issue Viewing the system version

MySQL Docker run-it Mysql/bin/bash

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A4/B3/wKioL1mvxRjBkE4_AAX23Vo_bGU014.png-wh_500x0-wm_ 3-wmp_4-s_2799272972.png "style=" Float:none; "title=" CentOS 64-bit -2017-09-06-17-50-43.png "alt=" wkiol1mvxrjbke4_ Aax23vo_bgu014.png-wh_50 "/>

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/06/02/wKiom1mvxTnAFDP9AAUmv0XZAIU126.png-wh_500x0-wm_ 3-wmp_4-s_1663877395.png "style=" Float:none; "title=" CentOS 64-bit -2017-09-06-17-51-04.png "alt=" Wkiom1mvxtnafdp9aaumv0xzaiu126.png-wh_50 "/>

***service mysql Start default MySQL does not start




This article is from the "12402638" blog, please be sure to keep this source http://12412638.blog.51cto.com/12402638/1963186

Docker Build Ubuntu+mysql Environment tutorial

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.