请选择 进入手机版 | 继续访问电脑版

网络科技

    今日:0| 主题:284363
收藏本版
互联网、科技极客的综合动态。

[其他] Docker can run on windows 10, without VMs (stable)

[复制链接]
哼着哼着就走调了 发表于 2016-10-18 18:58:07
573 10
Getting Started with Docker for Windows

  Welcome to Docker for Windows!
  Please read through these topics on how to get started. To    give us your feedbackon your experience with the app and report bugs or problems, log in to our    Docker for Windows forum.  
  Already have Docker for Windows?If you already have Docker for Windows installed, and are ready to get started, skip over to the    Getting Started with Dockertutorial.  
  Download Docker for Windows

  If you have not already done so, please install Docker for Windows. You can download installers from the stable or beta channel. For more about stable and beta channels, see theFAQs.  
            Stable channel      Beta channel              This installer is fully baked and tested, and comes with the latest GA version of Docker Engine.        
This is the best channel to use if you want a reliable platform to work with.        
These releases follow a version schedule with a longer lead time than the betas, synched with Docker Engine releases and hotfixes.            This installer offers cutting edge features and comes with the experimental version of Docker Engine, which is described in the        Docker Experimental Features READMEon GitHub.        
This is the best channel to use if you want to experiment with features we are working on as they become available, and can weather some instability and bugs. This channel is a continuation of the beta program, where you can provide feedback as the apps evolve. Releases are typically more frequent than for stable, often one or more per month.                            Get Docker for Windows (stable)        
                  Download checksum: InstallDocker.msi SHA256                            Get Docker for Windows (beta)        
                  Download checksum: InstallDocker.msi SHA256                          Important Notes:

   
          
  •         Docker for Windows requires 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later) and Microsoft Hyper-V. Please see          What to know before you installfor a full list of prerequisites.        
          
  •         You can switch between beta and stable versions, but _you must have only one app installed at a time_.        Also, you will need to save images and export containers you want to keep before uninstalling the current version before installing another. For more about this, see the          FAQs about beta and stable channels.        
       
    What to know before you install

  
       
  •       README FIRST for Docker Toolbox and Docker Machine users: Docker for Windows requires Microsoft Hyper-V to run. After Hyper-V is enabled, VirtualBox will no longer work, but any VirtualBox VM images will remain. VirtualBox VMs created with        docker-machine(including the        defaultone typically created during Toolbox install) will no longer start. These VMs cannot be used side-by-side with Docker for Windows. However, you can still use        docker-machineto manage remote VMs.      
       
  •       The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10.
       
  •       Containers and images created with Docker for Windows are shared between all user accounts on machines where it is installed. This is because all Windows accounts will use the same VM to build and run containers. In the future, Docker for Windows will better isolate user content.
       
  •       The Hyper-V package must be enabled for Docker for Windows to work. The Docker for Windows installer will enable it for you, if needed. (This requires a reboot).
          Note: If your system does not satisfy these requirements, you can installDocker Toolbox, which uses Oracle Virtual Box instead of Hyper-V.      
       
  •       Virtualization must be enabled. Typically, virtualization is enabled by default. (Note that this is different from having Hyper-V enabled.) For more detail see        Virtualization must be enabledin Troubleshooting.      
       
  •       What the install includes: The installation providesDocker Engine, Docker CLI client,Docker Compose, andDocker Machine.      
      
  Step 1. Install Docker for Windows

  
       
  •       Double-click        InstallDocker.msito run the installer.      
          If you haven’t already downloaded the installer (        InstallDocker.msi), you can get it                  here        . It typically downloads to your        Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.      
       
  •       Follow the install wizard to accept the license, authorize the installer, and proceed with the install.
          You will be asked to authorize        Docker.appwith your system password during the install process. Privileged access is needed to install networking components, links to the Docker apps, and manage the Hyper-V VMs.      
       
  •       Click        Finishon the setup complete dialog to launch Docker.      
                  

    Docker can run on windows 10, without VMs (stable)

    Docker can run on windows 10, without VMs (stable)-1-网络科技-experience,download,Download,Windows,windows
          
      
  Step 2. Start Docker for Windows

  When the installation finishes, Docker starts automatically.
  The whale in the status bar indicates that Docker is running, and accessible from a terminal.
  If you just installed the app, you also get a popup success message with suggested next steps, and a link to this documentation.
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-2-网络科技-experience,download,Download,Windows,windows
  
  When initialization is complete, select    About Dockerfrom the notification area icon to verify that you have the latest version.  
  Congratulations! You are up and running with Docker for Windows.
  Step 3. Check versions of Docker Engine, Compose, and Machine

  Start your favorite shell (    cmd.exe, PowerShell, or other) to check your versions of    dockerand    docker-compose, and verify the installation.  
  1. PS C:\Users\samstevens> docker --version
  2.   Docker version 1.12.0, build 8eab29e, experimental
  3.   PS C:\Users\samstevens> docker-compose --version
  4.   docker-compose version 1.8.0, build d988a55
  5.   PS C:\Users\samstevens> docker-machine --version
  6.   docker-machine version 0.8.0, build b85aac1
复制代码
Step 4. Explore the application and run examples

  The next few steps take you through some examples. These are just suggestions for ways to experiment with Docker on your system, check version information, and make sure    dockercommands are working properly.  
  
       
  •       Open a shell (        cmd.exe, PowerShell, or other).      
       
  •       Run some Docker commands, such as        docker ps,        docker version, and        docker info.      
          Here is the output of        docker psrun in a powershell. (In this example, no containers are running yet.)      
         
    1. PS C:\Users\samstevens> docker ps
    2.    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
    复制代码
         Here is an example of command output for        docker version.      
         
    1. PS C:\Users\Vicky> docker version
    2.    Client:
    3.    Version:      1.12.0
    4.    API version:  1.24
    5.    Go version:   go1.6.3
    6.    Git commit:   8eab29e
    7.    Built:        Thu Jul 28 21:04:48 2016
    8.    OS/Arch:      windows/amd64
    9.    Experimental: true
    10.    Server:
    11.    Version:      1.12.0
    12.    API version:  1.24
    13.    Go version:   go1.6.3
    14.    Git commit:   8eab29e
    15.    Built:        Thu Jul 28 21:04:48 2016
    16.    OS/Arch:      linux/amd64
    17.    Experimental: true
    复制代码
         Here is an example of command output for        docker info.      
         
    1. PS C:\Users\Vicky> docker info
    2.    Containers: 0
    3.    Running: 0
    4.    Paused: 0
    5.    Stopped: 0
    6.    Images: 0
    7.    Server Version: 1.12.0
    8.    Storage Driver: aufs
    9.    Root Dir: /var/lib/docker/aufs
    10.    Backing Filesystem: extfs
    11.    Dirs: 0
    12.    Dirperm1 Supported: true
    13.    Logging Driver: json-file
    14.    Cgroup Driver: cgroupfs
    15.    Plugins:
    16.    Volume: local
    17.    Network: host bridge null overlay
    18.    Swarm: inactive
    19.    Runtimes: runc
    20.    Default Runtime: runc
    21.    Security Options: seccomp
    22.    Kernel Version: 4.4.16-moby
    23.    Operating System: Alpine Linux v3.4
    24.    OSType: linux
    25.    Architecture: x86_64
    26.    CPUs: 2
    27.    Total Memory: 1.95 GiB
    28.    Name: moby
    29.    ID: BG6O:2VMH:OLNV:DDLF:SCSV:URRH:BW6M:INBW:OLAC:J7PX:XZVL:ADNB
    30.    Docker Root Dir: /var/lib/docker
    31.    Debug Mode (client): false
    32.    Debug Mode (server): false
    33.    Registry: https://index.docker.io/v1/
    34.    Experimental: true
    35.    Insecure Registries:
    36.    127.0.0.0/8
    复制代码
         Note:The outputs above are examples. Your output for commands like        docker versionand        docker infowill vary depending on your product versions (e.g., as you install newer versions).      
       
  •       Run        docker run hello-worldto test pulling an image from Docker Hub and starting a container.      
         
    1. PS C:\Users\samstevens> docker run hello-world
    2.   Hello from Docker.
    3.   This message shows that your installation appears to be working correctly.
    4.   To generate this message, Docker took the following steps:
    5.   1. The Docker client contacted the Docker daemon.
    6.   2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    7.   3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
    8.   4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
    复制代码
       
  •       Try something more ambitious, and run an Ubuntu container in a Bash shell.
         
    1. $ docker run -it ubuntu bash
    2.    PS C:\Users\samstevens> docker run -it ubuntu bash
    3.    Unable to find image 'ubuntu:latest' locally
    4.    latest: Pulling from library/ubuntu
    5.    5a132a7e7af1: Pull complete
    6.    fd2731e4c50c: Pull complete
    7.    28a2f68d1120: Pull complete
    8.    a3ed95caeb02: Pull complete
    9.    Digest: sha256:4e85ebe01d056b43955250bbac22bdb8734271122e3c78d21e55ee235fc6802d
    10.    Status: Downloaded newer image for ubuntu:latest
    复制代码
         Type        exitto stop the container and close the Bash shell.      
       
  •       For the pièce de résistance, start a Dockerized webserver with this command:
         
    1. docker run -d -p 80:80 --name webserver nginx
    复制代码
         This will download the        nginxcontainer image and start it. Here is the output of running this command in a powershell.      
         
    1. PS C:\Users\samstevens> docker run -d -p 80:80 --name webserver nginx
    2.    Unable to find image 'nginx:latest' locally
    3.    latest: Pulling from library/nginx
    4.    fdd5d7827f33: Pull complete
    5.    a3ed95caeb02: Pull complete
    6.    716f7a5f3082: Pull complete
    7.    7b10f03a0309: Pull complete
    8.    Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff12debeb7a092730d638c33e0de3e
    9.    Status: Downloaded newer image for nginx:latest
    10.    dfe13c68b3b86f01951af617df02be4897184cbf7a8b4d5caf1c3c5bd3fc267f
    复制代码
       
  •       Point your web browser at        http://localhostto display the start page.      
          (Since you specified the default HTTP port, it isn’t necessary to append        :80at the end of the URL.)      
                  

    Docker can run on windows 10, without VMs (stable)

    Docker can run on windows 10, without VMs (stable)-3-网络科技-experience,download,Download,Windows,windows
          
       
  •       Run        docker pswhile your webserver is running to see details on the container.      
         
    1. PS C:\Users\samstevens> docker ps
    2.   CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS
    3.   NAMES
    4.   dfe13c68b3b8        nginx               "nginx -g 'daemon off"   3 days ago          Up 45 seconds       0.0.0.0:80->80/tcp, 443/tc
    5.   p   webserver
    复制代码
       
  •       Stop or remove containers and images.
          The        nginxwebserver will continue to run in the container on that port until you stop and/or remove the container. If you want to stop the webserver, type:        docker stop webserverand start it again with        docker start webserver.      
          To stop and remove the running container with a single command, type:        docker rm -f webserver. This will remove the container, but not the        nginximage. You can list local images with        docker images. You might want to keep some images around so that you don’t have to pull them again from Docker Hub. To remove an image you no longer need, use        docker rmi <imageID>|<imageName>. For example,        docker rmi nginx.      
      
  Want more example applications?- For more example walkthroughs that include setting up services and databases with Docker Compose, seeExample Applications.  
  Docker Settings

  When Docker is running, the Docker whale is displayed in the system tray. If it is hidden, click the up arrow in the tray to show it.
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-4-网络科技-experience,download,Download,Windows,windows
  
  To get a popup menu with application options, right-click the whale:
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-5-网络科技-experience,download,Download,Windows,windows
  
  The    Settingsdialogs provide options to allow Docker auto-start, automatically check for updates, share local drives with Docker containers, enable VPN compatibility, manage CPUs and memory Docker uses, restart Docker, or perform a factory reset.  
  Beta 26 and newerinclude an option to switch between Windows and Linux conatiners. See    Switch between Windows and Linux containers (Beta feature). This is not yet available on stable builds.  
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-6-网络科技-experience,download,Download,Windows,windows
  
  General

      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-7-网络科技-experience,download,Download,Windows,windows
  
  
       
  •       Start Docker when you log in- Automatically start the Docker for Windows application upon Windows system login.      
       
  •       Check for updates when the application starts- Docker for Windows is set to automatically check for updates and notify you when an update is available. If an update is found, click        OKto accept and install it (or cancel to keep the current version). Uncheck this option if you do not want notifications of version upgrades. You can still find out about updates manually by choosing        Check for Updatesfrom the menu.      
       
  •       Send usage statistics- You can set Docker for Windows to auto-send diagnostics, crash reports, and usage data. This information can help Docker improve the application and get more context for troubleshooting problems.      
          Uncheck any of the options to opt out and prevent auto-send of data. Docker may prompt for more information in some cases, even with auto-send enabled. Also, you can enable or disable these auto-reporting settings with one click on the information popup when you first start Docker.
                        
      
  Shared Drives

  Share your local drives (volumes) with Docker for Windows, so that they are available to your containers.
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-8-网络科技-experience,download,Download,Windows,windows
  
  You will be asked to provide your Windows system username and password (domain user) to apply shared drives. You can select an option to have Docker store the credentials so that you don’t have to re-enter them every time.
  Permissions to access shared drives are tied to the credentials you provide here. If you run    dockercommands and tasks under a different username than the one used here to set up sharing, your containers will not have permissions to access the mounted volumes.  
  Tip:Shared drives are only required for volume mounting, not Windows containers.  
  See also    Verify domain user has permissions for shared drivesin Troubleshooting.  
  Advanced

      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-9-网络科技-experience,download,Download,Windows,windows
  
  
       
  •       CPUs- Change the number of processors assigned to the Linux VM.      
       
  •       Memory- Change the amount of memory the Docker for Windows Linux VM uses.      
      
  Please note, updating these settings requires a reconfiguration and reboot of the Linux VM. This will take a few seconds.
  Network

  You can configure Docker for Windows networking to work on a virtual private network (VPN).
  
       
  •       Internal Virtual Switch- You can specify a network address translation (NAT) prefix and subnet mask to enable internet connectivity.      
       
  •       DNS Server- You can configure the DNS server to use dynamic or static IP addressing.      
      
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-10-网络科技-experience,download,Download,Windows,windows
  
  Note:Some users reported problems connecting to Docker Hub on Docker for Windows stable version. This would manifest as an error when trying to run    dockercommands that pull images from Docker Hub that are not already downloaded, such as a first time run of    docker run hello-world. If you encounter this, reset the DNS server to use the Google DNS fixed address:    8.8.8.8. For more information, seeNetworking issues in Troubleshooting.  
  Note that updating these settings requires a reconfiguration and reboot of the Linux VM.
  Proxies

  Docker for Windows lets you configure HTTP/HTTPS Proxy Settings and automatically propagate these to Docker and to your containers. For example, if you set your proxy settings to    http://proxy.example.com, Docker will use this proxy when pulling containers.  
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-11-网络科技-experience,download,Download,Windows,windows
  
  When you start a container, you will see that your proxy settings propagate into the containers. For example:
  1. $ docker run -it alpine env
  2. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  3. HOSTNAME=b7edf988b2b5
  4. TERM=xterm
  5. HOME=/root
  6. HTTP_PROXY=http://proxy.example.com:3128
  7. http_proxy=http://proxy.example.com:3128
  8. no_proxy=*.local, 169.254/16
复制代码
You can see from the above output that the    HTTP_PROXY,    http_proxyand    no_proxyenvironment variables are set. When your proxy configuration changes, Docker restarts automatically to pick up the new settings. If you have containers that you wish to keep running across restarts, you should consider usingrestart policies  
  Docker daemon

  You can configure options on the Docker daemon in the given JSON configuration file, and determine how your containers will run.
  For a full list of options on the Docker daemon, seedaemon in the Docker Engine command line reference.  
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-12-网络科技-experience,download,Download,Windows,windows
  
  Note that updating these settings requires a reconfiguration and reboot of the Linux VM.
  Switch between Windows and Linux containers (Beta feature)

  Starting with Beta 26, you can select which daemon (Linux or Windows) the Docker CLI talks to. Select    Switch to Windows containersto toggle to Windows containers. Select    Switch to Linux containers.  
  Microsoft Developer Network has preliminary/draft information on Windows containers    here.  
  This feature is not yet available on stable builds.
  See also  
  Getting started with Windows containers (Beta feature)

  If you are interested in working with Windows containers, here are some guides to help you get started.
  
       
  •               Build and Run Your First Windows Server Container (Blog Post)gives a quick tour of how to build and run native Docker Windows containers on Windows 10 and Windows Server 2016 evaluation releases.      
       
  •               Getting Started with Windows Containers (Lab)shows you how to use the        MusicStoreapplication with Windows containers. The MusicStore is a standard .NET application and,        forked here to use containers, is a good example of a multi-container application.      
          Disclaimer:This lab is still in work, and is based off of the blog, but you can test and leverage the example walkthroughs now, if you want to start experimenting. Please checking back as the lab evolves.      
      
  Diagnose and Feedback

  If you encounter problems for which you do not find solutions in this documentation, searching    Docker for Windows issues on GitHubalready filed by other users, or on the    Docker for Windows forum, we can help you troubleshoot the log data.  
  Select    Upload a diagnostic.  
  This uploads (sends) the logs to Docker.
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-13-网络科技-experience,download,Download,Windows,windows
  
  To create a new issue directly on GitHub, open    Docker for Windows issues on GitHubin your web browser and follow the instructions in the README. Click    New Issueon that page to get a “create new issue” template prepopulated with sections for the ID and summary of your diagnostics, system and version details, description of expected and actual behavior, and steps to reproduce the issue.  
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-14-网络科技-experience,download,Download,Windows,windows
  
  Reset

      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-15-网络科技-experience,download,Download,Windows,windows
  
  
       
  •       Restart Docker- Shuts down and restarts the Docker application.      
       
  •       Reset to Toolbox default machine content- Imports containers and images from the existing Docker Toolbox machine named        default. (This option is enabled only if you have Toolbox installed.) The VirtualBox VM will not be removed.      
       
  •       Reset to factory defaults- Resets Docker to factory defaults. This is useful in cases where Docker stops working or becomes unresponsive.      
      
  Programs and Features -> Turn Windows Features on or off**, uncheck Hyper-V, and click **OK**. You can then use `docker-machine` and VirtualBox to run Docker containers. [These instructions](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install), which explain how to *enable* Hyper-V, show you how to get to the on/off controls for the Hyper-V feature. -->
  Where to go next

  
       
  •       Try out the        Getting Started with Dockertutorial.      
       
  •       Dig in deeper withlearn by example tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.      
       
  •       SeeExample Applications for example applications that include setting up services and databases in Docker Compose.      
       
  •       Interested in trying out the newswarm mode on Docker Engine v1.12?      
          See        Get started with swarm mode, a tutorial which includes specifics on how to leverage your Docker for Windows installation to run single and multi-node swarms.      
          Also, try out the Swarm examples in        docker labs. Run the        bash scriptand follow the accompanying        Docker Swarm Tutorial. The script uses Docker Machine to create a multi-node swarm, then walks you through various Swarm tasks and commands.      
       
  •       For a summary of Docker command line interface (CLI) commands, see        Docker CLI Reference Guide.      
       
  •       Check out theblog posts on Docker for Mac and Docker for Windows public betas, andearlier posts on the initial private beta.      
       
  •       Please give feedback on your experience with the app and report bugs and problems by logging into our        Docker for Windows forum.      
      
      

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-16-网络科技-experience,download,Download,Windows,windows
          Feedback?Questions? Suggestions?   
          Edit this page,file a ticket, or rate this page:

Docker can run on windows 10, without VMs (stable)

Docker can run on windows 10, without VMs (stable)-24-网络科技-experience,download,Download,Windows,windows
andyzhudandan 发表于 2016-10-18 19:38:25
站位支持
回复 支持 反对

使用道具 举报

刘星烁 发表于 2016-10-18 19:46:58
吾生也有涯,而吃也无涯.
回复 支持 反对

使用道具 举报

aiq档髑ge 发表于 2016-10-18 20:10:09
打酱油的人拉,回复下赚取积分
回复 支持 反对

使用道具 举报

小小蜗牛 发表于 2016-10-19 02:09:57
据说,回这个帖子会升官发财,我来试一下!
回复 支持 反对

使用道具 举报

sffr6582 发表于 2016-10-19 02:30:24
顶起哼着哼着就走调了
回复 支持 反对

使用道具 举报

lk979301071 发表于 2016-10-19 07:24:13
哼着哼着就走调了是男的还是女的?
回复 支持 反对

使用道具 举报

j2富凯 发表于 2016-10-19 07:48:20
楼主,j2富凯在到处找您呢!
回复 支持 反对

使用道具 举报

mewu5799 发表于 2016-10-20 02:17:55
楼主,笑一个,萌萌哒!
回复 支持 反对

使用道具 举报

chanchiukwan 发表于 2016-10-20 11:10:51
当爱情不在的时候,请对他说声祝福,毕竟,曾经爱过。
回复 支持 反对

使用道具 举报

我要投稿

回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表