Docker Machine has multiple commands in order to manage a machine.
Print which machine is active
Print the connection config for machine
Create a machine
Display the commands to set up the environment for the Docker client
Inspect information about a machine
Get the IP address of a machine
Kill a machine
Re-provision existing machines
Regenerate TLS Certificates for a machine
Restart a machine
Remove a machine
Log into or run a command on a machine with SSH.
Copy files between machines
Mount or unmount a directory from a machine with SSHFS.
Start a machine
Get the status of a machine
Stop a machine
Upgrade a machine to the latest version of Docker
Get the URL of a machine
Show the Docker Machine version or a machine docker version
Shows a list of commands or help for one command
For more available options to manage a Docker Machine, use
If you are using Ionos Cloud Docker Machine Driver with Rancher Machine, use
rancher-machine help to see the available commands.
To list the machines you have created, use the command:
It will return information about your machines, similar to this:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORStest-machine * ionoscloud Running tcp://22.214.171.124:2376 v20.10.5
To start a Docker Machine, run:
docker-machine start test-machine
Starting "test-machine"...Machine "test-machine" was started.Waiting for SSH to be available...Detecting the provisioner...Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
To stop a Docker Machine, run:
docker-machine stop test-machine
Stopping "test-machine"...Machine "test-machine" was stopped.
To restart a Docker Machine, run:
docker-machine restart test-machine
Restarting "test-machine"...Waiting for SSH to be available...Detecting the provisioner...Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
To get the status of a Docker Machine created, run:
docker-machine status test-machine
To remove a Docker Machine and all the resources associated with it, run:
docker-machine rm test-machine
It should produce results similar to this:
About to remove test-machineWARNING: This action will delete both local reference and remote instance.Are you sure? (y/n): y(test-machine) Starting deleting resources...(test-machine) NIC Deleted(test-machine) Volume Deleted(test-machine) Server Deleted(test-machine) LAN Deleted(test-machine) DataCenter Deleted(test-machine) IPBlock DeletedSuccessfully removed test-machine
The remove command can also be used with