- Docker on Windows
- Elton Stoneman
- 473字
- 2021-07-02 19:53:17
Docker for Windows
Docker for Windows is available from Docker Store—navigate to https://dockr.ly/docker-for-windows. You can choose between the Stable channel and the Edge channel. Both channels give you Docker CE, but the Edge channel follows the monthly release cycle, and you will get experimental features. The Stable channel follows the EE release cycle, with quarterly updates.
Download and run the installer. The installer will verify that you can run Docker in your setup and will configure the Windows features needed to support Docker. When Docker is running, you will see a whale icon in the notification bar, which you can click on for options:

You need to select Switch to Windows containers before you do anything else. Docker for Windows can run Linux containers by running Docker inside a Linux VM on your machine. That's great to test out Linux apps to see how they run in containers, but this book is all about Windows containers - switch over, and Docker will remember that setting in future.
While Docker for Windows is running, you can open Command Prompt or a PowerShell session and start working with containers. First, verify that everything is working as expected by running docker version. You should see output similar to this:
> docker version
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:30:30 2017
OS/Arch: windows/amd64
Server:
Version: 17.06.0-ce
API version: 1.30 (minimum version 1.24)
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 22:19:00 2017
OS/Arch: windows/amd64
Experimental: true
Now run a simple container:
docker container run dockeronwindows/ch01-whale
This uses a public image on Docker Cloud—one of the sample images for this book, which Docker will pull the first time you use it. If you don't have any other images, this will take few minutes, as it will also download the Microsoft Nano Server image that my image uses as a base. When the container runs, it shows some ASCII art and then exits. Run the same command again, and you will see that it executes much more quickly as the images are now cached locally.
That's all the setup you need. Docker for Windows also contains the Docker Compose tool I'll be using later in the book, so you're all set to follow along with the code samples.
- PostgreSQL Cookbook
- Amazon S3 Cookbook
- SharePoint Development with the SharePoint Framework
- Apache Spark 2.x for Java Developers
- JavaCAPS基礎、應用與案例
- ScratchJr趣味編程動手玩:讓孩子用編程講故事
- Emotional Intelligence for IT Professionals
- 循序漸進Vue.js 3前端開發實戰
- Python全棧開發:數據分析
- 面向對象分析與設計(第3版)
- Lync Server Cookbook
- Python數據分析與挖掘實戰(第2版)
- 測試架構師修煉之道:從測試工程師到測試架構師(第2版)
- Spark Cookbook
- MATLAB/Simulink與過程控制系統仿真