Using Docker for Windows first experience

Source: Internet
Author: User

This is the second time that you have used Docker for Windows.

Recently prepared to study some of the advanced features of Docker such as Swarm Clusters, need to use docker-machine,docker-machine currently only support Mac or Windows, Because there is no Mac, you need to run Docker on Windows. Official claims that Docker for Windows is a complete development platform for creating containerized apps in Windows systems. After reading this article, perhaps you will have a re-understanding of Docker and windows, a change before the windows of those who "do not favor."

First put a few for inspection:

1.docker Engine Information

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://s3.51cto.com/wyfs02/M00/8F/C4/wKioL1jseGWCJj45AAB5M7jebQM450.png" height= "864" />

2. Basic operation of the container

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://s3.51cto.com/wyfs02/M01/8F/C4/wKioL1jseGngIzlSAABj29zjPXI668.png" height= "506" />

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://s3.51cto.com/wyfs02/M02/8F/C4/wKioL1jseG3ymIBVAACM2VPSz2U409.png" height= "864" />

3. Container Mirroring basic Operation:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "http://s3.51cto.com/wyfs02/M00/8F/C4/wKioL1jseHGwBtl8AABkR1NK8xc261.png" height= "516" />

Docker for Windows Runtime Environment requirements:

1. The current Docker for Windows version requires 64-bit Windows Pro, enterprise or education (1511 November Update, Build 10586 or later) system, Subsequent versions may support more Windows 10,windows Server 2016 is also supported

2. The CPU virtualization and Hyper-V features must be enabled, and the Hyper-V role can be installed automatically during Docker for Windows installation, may restart Windows, and once you install Docker for Windows, VMware Virtualization products and other virtualized products will no longer be available, such as the inability to use VMware Workstation and VirtualBox

Some basic knowledge of Docker for Windows:

Docker for Windows is much more complex than the existing understanding, but simply describes some of the knowledge that has been gained:

There are several components of 1.Docker for Windows, including some bin programs on the Windows platform for users, and a Hyper-V-based virtual machine with Alpine Linux v3.5 operating system

2.docker Volume The Create command creates a data volume that is present in the virtual machine and is not easy to interact with the host (the data on the disk cannot be exposed to the host while the Hyper-V virtual machine is running), so the data volume function may be replaced by the-v option

3.Docker for Windows is used with PowerShell to manipulate Docker behavior through PowerShell, and of course CMD can

4.Docker for Windows supports two containers, Linux Container and Windows Container, which are Linux Container by default and rely on virtual machines running in Hyper-V. Windows container does not depend on virtual machines, but it also relies on Hyper-V. Switching between the two modes causes Windows to restart, and the obvious two modes of data are not shared, and their configuration and data are independent. Surprisingly, Windows container cannot run containers that depend on the Linux environment, such as Nginx.

Docker for Windows uses tips:

As with the Docker environment installed on the Linux platform, Docker for Windows also supports some common features:

1. Configure insecure registry address and Registry Mirror (accelerator) address

2. Support for data volume and host storage Path mapping (-v option), data volume support is not easy to use in Docker for Windows (refer to the basics above), we recommend using the-V option

3. Before using the-v option, it is recommended that you create a VHD virtual disk in Disk Management to mount to the host, such as the e-drive, and then share the virtual disk with Docker for Windows:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://s3.51cto.com/wyfs02/M00/8F/C5/wKiom1jseHTy2avKAAD4_4hR6_8354.png" height= "711" />

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;border-bottom:0px;border-left:0px; " Border= "0" alt= "image" Src= "Http://s3.51cto.com/wyfs02/M00/8F/C4/wKioL1jseHfwZaHDAACCnulnL5w529.png" height= "546" />

It is important to note that the VHD virtual disk will no longer mount after a reboot and requires a manual "Attach VHD".

There are a few interesting things to do with Docker for Windows:

1. Redefine the app, the app that runs on Linux, the native "put in" windows, easy to get a psychological "native sense"

2. Easy to operate container, no longer need to open virtualization products such as VMware and no need to use port mapping, start the Linux and boot container such a hassle, just double-click to run Docker for Windows, you can use, external access easy configuration

3. Start playing docker-machine and swarm clusters etc.

Start the installation now! Because it's not hard!

Reference Links:

Getting started with Docker for Windows https://docs.docker.com/docker-for-windows/

installing Docker for Windows https://docs.docker.com/docker-for-windows/install/

Tag:docker for Windows

--end--

This article is from "Communication, My Favorites" blog, please make sure to keep this source http://dgd2010.blog.51cto.com/1539422/1914864

Using Docker for Windows first experience

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.