The basic commands docker-machine are start, inspection, stop and restart to manage the host, upgrade to update the daemon and client docker and configure the client to connect to your host.
Facility
Bash
curl -L https://github.com/docker/machine/releases/download/v0.12.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&
chmod +x /tmp/docker-machine &&
sudo cp /tmp/docker-machine /usr/local/bin/docker-machineBasic commands:
See the version
text
docker-machine –versionCreate a virtual machine using virtualbox
text
docker-machine create –driver virtualbox DOCKER01List virtual machines
text
docker-machine lsAccess docker
text
docker-machine env DOCKER01
eval «$(docker-machine env DOCKER01)»Using the unset command we can reset the configuration (we remove the exported environment variables)
text
eval «$(docker-machine env –unset)»Start, stop, ssh or delete a DOCKER
text
docker-machine start DOCKER01
docker-machine ssh DOCKER01
docker-machine stop DOCKER01
docker-machine rm DOCKER01Get the IP address of a DOCKER
text
docker-machine ip defaultRun a web server
text
docker-machine run -d -p 8080:80 nginxAll the best
:wq!
Comments