Win10 Hyper-V Dockerインストール

Win10のHyper-Vを使ってDocker Desktop for Windowsを動かすことを目指す回。

事前準備

Hyper-Vを有効化する必要があるが、下記の公式ドキュメントを参照されたい。

Windows 10 での Hyper-V の有効化 | Microsoft Docs

インストール

下記の公式ページよりインストーラーをダウンロードした。

Docker Desktop for Mac and Windows | Docker

ボタンの表記が「Download for Windows (stable) 」となっているので、そのまま押下。

Docker Desktop Installer.exeが取得できたので、実行してインストール。

デスクトップのショートカットはいらないかも……
インストールが完了した後、PCの再起動

さっくりとインストール完了。ちょろすぎる。

動作確認

おもむろにWindows PowerShellを起動。

バージョン確認

2020/07/28の最新?

> docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:43:18 2020
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Hello world

Dockerが自動でイメージの取得まで済ませてくれるらしい。便利。

> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:451ce787d12369c5df2a32c85e5a03d52cbcef6eb3586dd03075f3034f10adcd
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

チュートリアル?

Docker Desktopを起動してみると、チュートリアルが始まった。

右上のセッティグとかも見てみたけど、まだ良くわからなかった

画面のボタンをぽちぽち押すと画面右側のコンソールで処理が走るというチュートリアルだったが、正直何が起きているのかよくわからないままに進んでいく感はあった(この時点で細かく説明するよりは全体の流れをさっと見せる方が良いと思うので、悪い点ではない)。


途中、ファイアウォールの警告が出たので[OK]を押下
イメージの保存とシェアをするステップ
アカウントを持っていなかったので新規登録
チュートリアル画面のUI
イメージの保存まで完了すると
[View in Browser]ボタンの押下を促される
ブラウザでこのようなページが開かれる
先程のボタンポチポチよりも重めのイントロダクションとチュートリアルだ
Docker Desktopを見ると、コンテナリストが表示されている
(hello-worldをやった形跡がある)

以上の流れで、Docker Desktop for Windowsをインストールしてチュートリアルに到達するところまでができた。

ひとまずここまで。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です