Created
February 1, 2017 17:32
-
-
Save ajeetraina/2caf478832599a2d6dc4ff31453606d2 to your computer and use it in GitHub Desktop.
Getting Started with Docker-Machine on Mac OS X Sierra
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
bash-3.2# docker version | |
Client: | |
Version: 1.13.0 | |
API version: 1.25 | |
Go version: go1.7.3 | |
Git commit: 49bf474 | |
Built: Wed Jan 18 16:20:26 2017 | |
OS/Arch: darwin/amd64 | |
Server: | |
Version: 1.13.0 | |
API version: 1.25 (minimum version 1.12) | |
Go version: go1.7.3 | |
Git commit: 49bf474 | |
Built: Wed Jan 18 16:20:26 2017 | |
OS/Arch: linux/amd64 | |
Experimental: true | |
bash-3.2# docker-machine create -d virtualbox master1 | |
Running pre-create checks... | |
(master1) Image cache directory does not exist, creating it at /var/root/.docker/machine/cache... | |
(master1) No default Boot2Docker ISO found locally, downloading the latest release... | |
(master1) Latest release for github.com/boot2docker/boot2docker is v1.13.0 | |
(master1) Downloading /var/root/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v1.13.0/boot2docker.iso... | |
(master1) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100% | |
Creating machine... | |
(master1) Copying /var/root/.docker/machine/cache/boot2docker.iso to /var/root/.docker/machine/machines/master1/boot2docker.iso... | |
(master1) Creating VirtualBox VM... | |
(master1) Creating SSH key... | |
(master1) Starting the VM... | |
(master1) Check network to re-create if needed... | |
(master1) Found a new host-only adapter: "vboxnet0" | |
(master1) Waiting for an IP... | |
Waiting for machine to be running, this may take a few minutes... | |
Detecting operating system of created instance... | |
Waiting for SSH to be available... | |
Detecting the provisioner... | |
Provisioning with boot2docker... | |
Copying certs to the local machine directory... | |
Copying certs to the remote machine... | |
Setting Docker configuration on the remote daemon... | |
Checking connection to Docker... | |
Docker is up and running! | |
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env master1 | |
vbash-3.2# docker-machine ls | |
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS | |
master1 - virtualbox Running tcp://192.168.99.100:2376 v1.13.0 | |
bash-3.2# docker-machine env master1 | |
export DOCKER_TLS_VERIFY="1" | |
export DOCKER_HOST="tcp://192.168.99.100:2376" | |
export DOCKER_CERT_PATH="/var/root/.docker/machine/machines/master1" | |
export DOCKER_MACHINE_NAME="master1" | |
# Run this command to configure your shell: | |
# eval $(docker-machine env master1 | |
bash-3.2# docker-machine ls | |
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS | |
master1 * virtualbox Running tcp://192.168.99.100:2376 v1.13.0 | |
bash-3.2# docker-machine ssh master1 | |
## . | |
## ## ## == | |
## ## ## ## ## === | |
/"""""""""""""""""\___/ === | |
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ | |
\______ o __/ | |
\ \ __/ | |
\____\_______/ | |
_ _ ____ _ _ | |
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ | |
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| | |
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | | |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| | |
Boot2Docker version 1.13.0, build HEAD : 5b8d9cb - Wed Jan 18 18:50:40 UTC 2017 | |
Docker version 1.13.0, build 49bf474 | |
docker@master1:~$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment