LoginSignup
2
2

More than 5 years have passed since last update.

Docker for Macのインストール

Last updated at Posted at 2018-01-10

:large_blue_circle: 公式からインストール

https://www.docker.com/docker-mac
OSX Yosemite 10.10.3以上である必要があります。

:large_blue_circle: インストールができているか確認しましょう。

$ docker run hello-world
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://cloud.docker.com/

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

このメッセージが表示されればOKです。

:large_blue_circle: ubuntuをxhyveで起動しましょう!

$ docker run -it ubuntu bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
50aff78429b1: Pull complete 
f6d82e297bce: Pull complete 
275abb2c8a6f: Pull complete 
9f15a39356d6: Pull complete 
fc0342a94c89: Pull complete 
Digest: sha256:ec0e4e8bf2c1178e025099eed57c566959bb408c6b478c284c1683bc4298b683
Status: Downloaded newer image for ubuntu:latest
root@cb4f20859b19:/#

無事ubuntuに入り、rootになってますね。起動も早いです。

Docker for Macではvurtualboxではなくxhyveを使うようです。
vurtualboxを使いたい場合はDocker for MacではなくDocker toolboxをインストールしましょう。
Docker toolboxのインストール(公式)

2
2
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
2
2