hiroの長い冒険日記

主にコンピュータ周辺の興味を持った内容を綴ります

Windows10 Docker for Windows install

当日記ではアフィリエイト広告を利用しています

Synology DS218+ で Docker を使ってみたが、Windows10上でも Docker が動作するようなので、試してみる事にした。

www.docker.com
qiita.com

ユーザー登録とインストール

  • Hyper-V は既に有効化してある。
  • まずはユーザー登録。User ID、Mail address、Password で登録した。
  • Docker for Windows Installer.exe の download、install。Stable と Edge の2種類あるが、今回は Stable 版を選択した。
  • logout、login すると Docker Desktop がタスクトレイに常駐するようになる。
  • Hyper-V マネージャーに MobyLinuxVM が追加・動作している。

動作確認

> docker version
Client: Docker Engine - Community
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:47:51 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:55:00 2018
  OS/Arch:          linux/amd64
  Experimental:     false
  • hello-world
> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
~ 省略 ~
  • まずは動作しているらしい。
  • container の作成、起動、停止

qiita.com

  • この手順で UbuntuDebian が起動した。どちらも、起動すると root のコマンドラインの状態となり、apt-get 等実行できる。
  • image と container、docker の概念にもう少し慣れないと。

結果

Docker for Windows を install し、UbuntuDebian を起動する事が出来た。

今回の Docker for Windows を試してみた目的は2つ。

  • Docker for WindowsHyper-V を使用するので、ちゃんと使用できるか。
  • toolchain を container 内で動作させ、各種バイナリを作成できるかどうか確認する。

一つ目について、VirtualBox on Hyper-V が動作しないので、Windows10 の Hyper-V がちゃんと設定されていないのかもと疑っていたが、

この2点から、Hyper-V がちゃんと設定されて、動作している事が確認できた。

二つ目については、cross compile したバイナリを qemu で動作チェックしてみたいと考えている。これについてはこれからやってみる。将来、Raspberry Pi の binary を PC で作成してみたいと思っている。