Last active
September 6, 2015 11:31
-
-
Save bootjp/df80dfc8fc3824365af4 to your computer and use it in GitHub Desktop.
docker-machine,setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker-machine create -d virtualbox \ | |
# --engine-insecure-registry oreore.repo.bootjp.me:5000 \ | |
docker-machine-vm # enter (return) | |
## 出力 | |
> docker-machine-vm | |
Creating VirtualBox VM... | |
Creating SSH key... | |
Starting VirtualBox VM... | |
Starting VM... | |
To see how to connect Docker to this machine, run: docker-machine env docker-machine-vm | |
# docker-machineにVMの情報を伝えます | |
$ eval $(docker-machine env docker-machine-vm) | |
$ docker info | |
## 省略 | |
$ docker run ubuntu:14.04 /bin/echo 'Hello world' | |
## イメージがないはずなので、pullされます | |
Hello world | |
## 起動と終了方法 | |
$ docker-machine start docker-machine-vm | |
$ docker-machine stop docker-machine-vm | |
## IPアドレス確認方法 | |
$ docker-machine ip docker-machine-vm | |
192.168.99.100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment