A command line utility for controlling Docker for Mac and Windows.
The utility was created due to a limitation in Docker for Windows which prevents users from controlling the Docker service from the command line when running Linux containers.
- Docker for Mac 17.12 or greater
- Docker for Windows 17.09 or greater
- Clone or download the repository
- Determine the absolute path to the
bin
directory which contains the binary for your operating system - Add the path to your system's
PATH
variable.
The utility has a simple set of commands which are invoked like this:
docker-control <command>
See a list of commands below.
The config
command has a simple getter/setter interface. You can retrieve a
value by invoking the following command:
docker-control config get <name>
Setting a value is just as easy:
docker-control config set <name> <value>
You can also retrieve and set multiple values with a single invocation of the commands:
docker-control config get <name> <name> ...
docker-control config set <name> <value> <name> <value> ...
See the Configuration section for a list of supported configuration values.
Note: Changes to configuration values will first take effect once the Docker service is restarted. This command will not trigger a restart as users may wish to delay this action.
The reset
command resets the configuration values and triggers a restart of
the Docker service.
The restart
command restarts the Docker service.
The start
command starts the Docker service.
The stop
command stops the Docker service.
The version
command prints a version string. The command can also be invoked
by using the aliases -v
or --version
.
While some values are supported by both Docker for Mac and Windows, others are supported by only one of the systems. Trying to specify a system specific value on the wrong system will result in an error.
The absolute path to the disk image for the virtual machine.
The amount of memory (in megabytes) to allocate for the virtual machine.
The number of processors to allocate for the virtual machine.
Whether to start Docker when a user logs in.
Whether to automatically update Docker when a new version is released.
Whether to allow anonymous usage data to be sent to the Docker team.
The subnet address for the virtual network.
A comma separated list of hostnames which should bypass the proxy servers.
The URL for an insecure proxy server (HTTP).
The URL for a secure proxy server (HTTPS).
Whether to use custom proxy servers when pulling images.
A comma separated list of directory paths, which will be used for host mapped volumes.
Note: You can only share root directories on Windows i.e. C:\
. You must
also run the utility in an elevated command prompt (Run as administrator
).
Whether to expose an insecure TCP socket for the Docker daemon.
Whether to use DNS forwarding.
The IP address of the primary DNS server.
The subnet mask size for the virtual network.
The username and password to use when accessing the shared directories.
Note: The value must be specified as username:password
or
computername\username:password
. The username will be prefixed with the current
computer name, if the former format is used.
See the LICENSE file.