swarm command runs a Swarm container on a Docker Engine host and performs the task specified by the required subcommand,
swarm with the following syntax:
$ docker run swarm [OPTIONS] COMMAND [arg...]
For example, you use
swarm with the
manage subcommand to create a Swarm manager in a high-availability cluster with other managers:
$ docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise 172.30.0.161:4000 consul://172.30.0.165:8500
swarm command has the following options:
--debug— Enable debug mode. Display messages that you can use to debug a Swarm node. For example: time=“2016-02-17T17:57:40Z” level=fatal msg=“discovery required to join a cluster. See ‘swarm join --help’.” The environment variable for this option is
-l "<value>"— Set the log level. Where
panic. The default value is
--experimental— Enable experimental features.
-h— Display help.
-v— Display the version. For example: $ docker run swarm --version swarm version 1.1.0 (a0fd82b)
swarm command has the following subcommands:
© 2013–2016 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.