Docker Machine (DM) Commands. (All at https://docs.docker.com/machine/reference/)
- Commands (DM = docker-machine)
- User runs commands below from outside the Linux VM (ie, OsX terminal)
- Host machine (Unix in OsX case) w/docker installed, can create a docker-machine which creates the Docker_Host, Docker Server/Engine/Daemon & configures a Docker-Client
- Create a docker-machine
- User runs commands below from outside the Linux VM (ie, OsX terminal)
- Commands (DM = docker-machine)
$ docker-machine create --driver virtualbox dev
--driver (or just -d)
provider machine is created on: digitalocean, aws, virtualbox (local)
dev name of machine
Examples
$ docker-machine create -d digitalocean consul
name is “consul”
$ docker-machine create --driver digitalocean --digitalocean-access-token <xxxxx> docker-app-machine
name is docker-app-machine
- $ docker-machine → list all commands
- $ docker-machine ls → list all DMs
- $ docker-machine active → list active DM
- $ docker version → displays versions of client and servers
- $ docker-machine start [machine name]
- $ docker-machine stop [machine name]
- $ docker-machine env [machine name] → connect term & virt box
- $ docker-machine ip [machine name] → ip address of machine
- $ docker-machine status [machine name] → show virt box stat
- $ docker-machine ssh consul ifconfig
- Above runs command ifconfig from within the docker-machine named “consul”