Commands

Docker Machine Commands

Docker Machine has multiple commands in order to manage a machine.

Command
Description

active

Print which machine is active

config

Print the connection config for machine

create

Create a machine

env

Display the commands to set up the environment for the Docker client

inspect

Inspect information about a machine

ip

Get the IP address of a machine

kill

Kill a machine

ls

List machines

provision

Re-provision existing machines

regenerate-certs

Regenerate TLS Certificates for a machine

restart

Restart a machine

rm

Remove a machine

ssh

Log into or run a command on a machine with SSH.

scp

Copy files between machines

mount

Mount or unmount a directory from a machine with SSHFS.

start

Start a machine

status

Get the status of a machine

stop

Stop a machine

upgrade

Upgrade a machine to the latest version of Docker

url

Get the URL of a machine

version

Show the Docker Machine version or a machine docker version

help

Shows a list of commands or help for one command

For more available options to manage a Docker Machine, use docker-machine help.

Rancher Machine Commands

If you are using Ionos Cloud Docker Machine Driver with Rancher Machine, use rancher-machine help to see the available commands.

Examples

List Machines

To list the machines you have created, use the command:

It will return information about your machines, similar to this:

Start a Machine

To start a Docker Machine, run:

Expected output:

Stop a Machine

To stop a Docker Machine, run:

Expected output:

Restart a Machine

To restart a Docker Machine, run:

Expected output:

Get Status

To get the status of a Docker Machine created, run:

Remove a Machine

To remove a Docker Machine and all the resources associated with it, run:

It should produce results similar to this:

The remove command can also be used with --force or -f flag.

Last updated