6. Windows のコンテナ
• Windows Server 2016 or Windows 10
• Hyper-V の役割 が必要(Hyper-V コンテナ)
• Linux コンテナは動かない
• Docker for Windows とはまた別
• 2種類のベース OS イメージ
• windowsservercore
• nanoserver
• Azure/AWS でも動かせる!!
6
概要
ホスト OS Windows Server コンテナー Hyper-V コンテナー
Windows Server 2016 フル UI Server Core イメージ Nano Server イメージ
Windows Server 2016 Core Server Core イメージ Nano Server イメージ
Windows Server 2016 Nano Nano Server イメージ Nano Server イメージ
Windows 10 Insider Releases 利用不可 Nano Server イメージ
参考 :これが噂の Nano Server ~期待に応えるために小さくなった次期サーバー OS~
https://channel9.msdn.com/Events/de-code/decode-2015/CDP-016
10. Windows のコンテナ
• docker コマンド
• PowerShell は...?
• PowerShell For Docker
• https://msdn.microsoft.com/en-
us/virtualization/windowscontainers/management/d
ocker-powershell
10
管理
Through our conversations with you, our users though forums, over Twitter, in GitHub, and even in person one question has
come up more than any other – why can’t I see Docker containers from PowerShell?
As we’ve discussed the pro’s, con’s and various options with you we’ve come to the conclusion that the container PowerShell
module needed an update… So we are deprecating the container PowerShell module that has been shipping in the preview
builds of Windows Server 2016 and have begun work replacing it with a new PowerShell module for Docker. While the
development of this new module is already underway but with a different approach than in the past – we’re doing the work in
the open. Our goal for this module is that it will be a community collaboration that results in a great PowerShell experience for
containers though the Docker engine. This new module builds directly on top of the Docker Engine’s REST interface enabling
user choice between the Docker CLI, PowerShell or both.
_人人人人人_
> 開発中 <
 ̄Y^Y^Y^Y^Y^ ̄
12. 動かしてみよう
• Windows Server の Windows コンテナー
• https://msdn.microsoft.com/ja-
jp/virtualization/windowscontainers/quick_start/quic
k_start_windows_server
12
Windows Server コンテナー
イメージの一覧
PS C:¥> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/sample-dotnet latest c14528829a37 3 days ago 911 MB
microsoft/iis latest b6a44de60ef9 2 weeks ago 8.96 GB
microsoft/windowsservercore latest 93a9c37b36d0 5 weeks ago 8.68 GB
microsoft/nanoserver latest e14bc0ecea12 5 weeks ago 810 MB
コンテナの起動
PS C:¥> docker run -d -p 80:80 microsoft/iis:latest
83f7f70c8b54d94511c3d065be3891271b04e64bc274b779d15dac538882ba43
起動しているコンテナの確認
PS C:¥> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
2544f4bf9a37 microsoft/iis:latest "C:¥¥ServiceMonitor..." 2 minutes ago Up 2 minutes 0.0.0.0:80-
>80/tcp elastic_curran
17. • Windows Server and Docker
• http://www.slideshare.net/Docker/windows-server-
and-docker-the-internals-behind-bringing-docker-
and-containers-to-windows-by-taylor-brown-and-
john-starks
• Windows Container Networking
• https://blogs.technet.microsoft.com/virtualization/20
16/05/05/windows-container-networking/
17