LoginSignup
4
5

More than 5 years have passed since last update.

Docker Community Edition for WindowsをWindows 10 Proにインストール

Posted at

Docker Community Edition for WindowsをWindows 10 Proにインストールします。
Dockerは、商用版がEnterprise Editionとなり、Community Editionが無償版となるようです。

Hyper-Vを有効化

まずは、Windows 10 Proの「Windowsの機能」画面を立ち上げて、Hyper-Vを有効化する。
2017-04-30 (1).png

Docker CEをダウンロード&インストール

以下の場所からWindows版をダウンロードする。
Docker Community Edition
2017-04-30 (2).png

「InstallDocker.exe」をダウンロードしたら、インストール(全てデフォルトのまま)。

インストール後の確認

インストール後、hello-worldを試してみる。
ローカルにないので、インストールされる。その後、hello-worldが実行される。

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\spiderx> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
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.
 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:
 $

ubuntuのbashを試してみる。
Hello-worldと同じく、パッケージが無いのでインストールされる。
その後、bashが立ち上がる。

 $ docker run -it ubuntu bash

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

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

PS C:\Users\spiderx> docker run -it ubuntu bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
aafe6b5e13de: Pull complete
0a2b43a72660: Pull complete
18bdd1e546d2: Pull complete
8198342c3e05: Pull complete
f56970a44fd4: Pull complete
Digest: sha256:f3a61450ae43896c4332bda5e78b453f4a93179045f20c8181043b26b5e79028
Status: Downloaded newer image for ubuntu:latest
root@e2151021af68:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@e2151021af68:/# pwd
/
root@e2151021af68:/# ls home
root@e2151021af68:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@e2151021af68:/# pwd
/
root@e2151021af68:/# exit
exit
PS C:\Users\spiderx>

とりあえず、インストールは成功!

参考URL等

無償のDocker for Windowsで手軽にLinuxコンテナを利用する

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5