D1 Docker:. Win7 the installation environment Docker

[ Download and install ]

  win7, win8, etc. need to use docker toolbox to install, the country can use a mirror to download Ali cloud, Download: http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/

  Then install prompts fool installation, after the installation is complete, open Docker Quickstart Terminal   

  There may be an error:

  

   Right-click on the "Properties", then click on the "compatibility." The reason here will complain because I have already installed the Git, but the default installation path is not its address set, modify and then open it.

   

  Open is shown below:

  

       

  View docker version: docker version

  The following may report the following error: https://github.com/docker/for-win/issues/2671

  error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

  [ Treatment ]: It should be open virtualization technology BIOS, and how to open their own Baidu. After opening the restart.

  View docker open again Version: docker version, shown below:

  

   Docker successful installation instructions here!

[ Virtual machine ]

  Here the main use of docker-machine command.

  1. First, check the virtual machine should be installed: docker-machine ls, here seen the launch of a name for the default virtual machine.

   

   2. View the virtual machine environment variables default configuration: docker-machine env default

   

  [Continued]: how to modify the virtual machine environment variables

  3. You can log on to the target virtual machine using the ssh command, otherwise the default action is the default virtual machine: docker-machine ssh default

   

  4. Use the exit command to exit

  

[ Download the installation image

   1. Search hello-world Related: docker search hello-world

  

   2. Here we pull kitematic / hello-world-nginx image to the default virtual machine: docker pull kitematic / hello-world-nginx

  

   3. After the download is complete view docker container mirror: docker images

   

   See here kitematic / hello-world-nginx this image to download, because the front of the pull when TAG is not specified, so download the latest version (latest)

  4. Next, using the container kitematic / hello-world-nginx called a start image of the HelloWorld: docker run --name HelloWorld -p 80:80 -d kitematic / hello-world-nginx

   

  run Syntax:

    --name: the name of the specified container      

    -p: Specifies the port mapping     

    -d: background, so as not to start in the current print log window

  More about the run command parameter command can be used to view: docker run --help

  5. Check container docker: docker PS -a (Note: if not -a view of the container of the start-up state)

  

  6. In the address bar enter http://192.168.99.100, we can see the container has started

  

   7. Here you can see the start of the process container situation: docker top HelloWorld

   

  Nginx can see the default application, a master process and a worker process.

  8. Next we stop the container: docker stop HelloWorld, and then view the container situation: docker ps -a, you can see HelloWorld container state to the Exited

  

  9. Use the docker container container-related command to view the relevant information.

   

  Note: Some of the information required to appear in the container after the start, such as port binding information:

  

  You can also rename a container: docker container rename HelloWorld HelloWorldNginx

  

  More docker container commands can be viewed by docker container --help

  

   10. Remove the container: docker rm 

   

   Note: You can not remove a container is running, we can first perform the stop command and then the rm command

  

   If you use the stop command is too slow or stuck situation, can directly kill container: docker kill HelloWorldNginx, pay attention here and did not remove the container, but "quick" stop container.

[ Kitematic GUI interface ]

  In addition to command-line operation, window Docker version also provides Kitematic GUI interface, there is provided a mirror image search and download features, you can also configure some basic information containers, such as the name of the vessel, port mapping, etc., more convenient. Graphical interface will not be introduced here.

  

 

   

[ Summary ]

  Docker's window version provides kitematic GUI interface to facilitate our search and download images, perform simple configuration and other functions; the same time, we have to be familiar with the command line Docker related operations, so as to better understand and deal with the problem. 

Guess you like

Origin www.cnblogs.com/zlxyt/p/11845947.html