Docker:

Think of it as a piece of software , In this software , You can also install other software , You can also add the environmental dependencies that the software needs , In this way, developers' programs can flow in different environments , Avoid the program “ The water ” The state of

Docker Structure diagram

It can be seen from the picture that :  operation Docker It can be divided into :  install Docker >> operation Docker service object >> Operating the mirror >> Container operation >> export

One .linux Install in Docker:

# 1、yum The package is updated to the latest 
yum update
# 2、 Install the required packages , yum-util Provide yum-config-manager function , The other two are devicemapper driving-dependent
yum install -y yum-utils device-mapper-persistent-data lvm2
# 3、 Set up yum Source
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 4、 install docker, When the input interface appears, press y
yum install -y docker-ce
# 5、 see docker edition , Verify that the verification is successful
docker -v Two

e. operation Docker service object , Can be divided into 5 An instruction

1. View service status   systemctl status docker

2. Start the service   systemctl start docker

3. Out of Service   systemctl stop docker

4. Restart the service   systemctl resstart docker

5. Start up the service   systemctl enable docker

3、 ... and . Operating the mirror

1. View local image   : docker images

2. Search mirroring ( From the central warehouse ) Such as : docker search mysql

3. docker pull mysql 5.6( If not followed by the version number, download the official default version )

4.docker rmi + Mirror image ID

Four . Container operation

1. Create a container : docker run -it/id/create   --name=xxx( Omit not to write ) mysql:5.6( Mirror name : Version number )  /bin/bash  //-it: The open container is in interactive mode : After the command is executed, it goes directly into the container   -id: Guardian mode , The command does not enter the container after execution , But the container service starts create: To create a container , After the order is executed , The state of the container is waiting to be opened

2. Start the container :docker start xxx( Container name )

3. Into the container :docker exec xxx( Container name ) The container must be started to execute successfully

4. Exit the container :exit ( If the container is in interactive mode , The state of the container will change to the stop state after push out , If the container is in guard mode, exit is just exit window , The container doesn't stop ).

5. View started container docker ps  View all containers docker ps -a

6. View the container details : docker inspect

5、 ... and . export

1. Export a container as a mirror :docker commit  Containers id    Image name : Version number

2. Make a mirror image into j Compressed package ::docker save -o xxxx.jar( Package name ) Image name : Version number

3. Export a compressed package as a mirror :docker load -i xxxx.jar( Package name )

Docker More articles about introduction and usage

  1. Sum up about Ubuntu install Docker Configuration related problems and solutions

    Sum up about Ubuntu install Docker Configuration related problems and solutions Tomcat Example Software image (xx Erection sequence )---- Running the mirror ---- Create a container ( Running software , Running xx): step : 1. Search mirroring ...

  2. Lin Fan :Docker function GUI Software method

    Following last week's “Kubernetes v1.0 Feature analysis ” After sharing , This week we invited ThoughtWorks Consultant Lin Fan brings you the theme of “Docker function GUI Software method ” The share of . Guest profile : Lin Fan ,Thought ...

  3. docker (1) --- brief introduction , Use

    One .docker brief introduction : Containers ( container-based ) Virtualization solution , Make full use of the existing machine of the operating system itself System and characteristics , For lightweight virtualization ( Each virtual machine is not installed with a complete virtual machine ), Some even call him the new one ...

  4. Docker Related definitions

    Docker Related definitions Basic website :http://www.runoob.com/docker/docker-tutorial.html Docker The idea comes from the container , What problem does the container solve ? On a big ship , ...

  5. Docker function GUI Software method

    from https://www.csdn.net/article/2015-07-30/2825340 brief introduction : Docker adopt namespace The container is isolated from the network and running environment on the host , By default , stay ...

  6. Docker And Dockerfile Write and use

    Docker An introduction to the Docker It's based on the container , It's further encapsulated , It greatly simplifies the creation and maintenance of containers . bring Docker Technology is lighter than virtual machine technology . quick . Here are two contrast pictures . We can see that the traditional virtual machine technology is virtual out of ...

  7. 【 Cloud computing 】docker Related open source projects 、 Tools

    The top ten are based on Docker Development tools author                      Guo Lei         Published on      2014 year 8 month 19 Japan      |              Be careful :QCon Global software development ...

  8. [ turn ]Oracle 10g And pro*c Related problems and solutions ( turn )

    Oracle 10g And pro*c Related problems and solutions 2008 year 08 month 21 Japan Thursday In the morning 11:21 It's been going on lately ORACLE 10g and PRO*C Learning from .  There are many problems :  Here it is , Ready for other use ...

  9. NetCat Introduction and usage

    The test channel of excellent learning network should meet the needs of the vast number of examinees , Specially designed for the examinees who take part in the examination “NetCat Introduction and usage ” Special topics and other related information , For examinee's reference ! It's one of the most classic tools in intrusion ,NetCat It is said by all network security enthusiasts and researchers that ...

  10. db2 Related problems and solutions

    DB2 Related problems and solutions : One .DB2 The code page in (codepage) problem . DB2 There was a code page error during the backup , After modifying the code page, the backup is normal , But there was a code page error when creating the database . This is a DB2 Code page configuration used by the server ...

Random recommendation

  1. Judge the present VC Is it the active page being displayed

    viewController.isViewLoaded && viewController.view.window

  2. UIImagePickerController Detailed explanation

    Reprinted from :http://blog.csdn.net/kingsley_cxz/article/details/9157093 1.UIImagePickerController Static method of : imagep ...

  3. C# Form Illegal characters

    Add... To the head EnableEventValidation="false" ValidateRequest="false"

  4. modify ubuntu Press the power button to trigger the effect

    GUI The internal terminal executes the following instructions , Or add it into the startup script gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown ...

  5. Simulator SDK route

    I'm guessing you already find it out, but just for the record: the UIKit.framework is available only ...

  6. WebView brief introduction

    WebView brief introduction date : 2013 year 10 month 29 Japan Be careful : API There may be evolution , So it depends on the current time Inheritance structure : public class WebView extends AbsoluteL ...

  7. javascript_ Variable

    Let's start with variables ,JavaScript Variables can be used to hold two types of values : Basic types and reference types . 1, The basic types are well understood , From basic data types :underfined,null,boolean,number and string ...

  8. React Conditions apply colours to a drawing

    Pass on the judgment class LoginControl extends React.Component { constructor(props) { super(props); this.handleLogi ...

  9. AVPlayer Music playing, backstage playing , And lock screen theme settings

    First step : stay appDelegate Notice in app Support background playback : In the method - (BOOL)application:(UIApplication *)application didFinishLaunching ...

  10. RHEL-7.1 Server.x86_64 yum Source set to CD

    1. Mount the cd-rom First, in the media Create a folder in the directory CentOS mkdir CentOS Then mount the CD on CentOS Next mount -t iso9660 -o loop /dev/cdrom /medi ...