簡化Docker安裝的命令行工具:Docker Machine
Docker Machine是一個簡化Docker安裝的命令行工具,通過一個簡單的命令行即可在相應的平臺上安裝Docker,比如VirtualBox、 Digital Ocean、Microsoft Azure。
使用過程:
$ docker-machine create -d virtualbox dev INFO[0000] Creating SSH key... INFO[0000] Creating VirtualBox VM... INFO[0007] Starting VirtualBox VM... INFO[0007] Waiting for VM to start... INFO[0041] "dev" has been created and is now the active machine. INFO[0041] To point your Docker client at it, run this in your shell: $(docker-machine env dev) $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox Running tcp://192.168.99.127:2376 $ $(docker-machine env dev) $ docker run busybox echo hello world Unable to find image 'busybox:latest' locally 511136ea3c5a: Pull complete df7546f9f060: Pull complete ea13149945cb: Pull complete 4986bf8c1536: Pull complete hello world $ docker-machine create -d digitalocean --digitalocean-access-token=secret staging INFO[0000] Creating SSH key... INFO[0001] Creating Digital Ocean droplet... INFO[0002] Waiting for SSH... INFO[0070] Configuring Machine... INFO[0109] "staging" has been created and is now the active machine. INFO[0109] To point your Docker client at it, run this in your shell: $(docker-machine env staging) $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev virtualbox Running tcp://192.168.99.127:2376 staging * digitalocean Running tcp://104.236.253.181:2376
https://github.com/docker/machine
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!