diff --git a/docs/index.md b/docs/index.md index 4fb263da59..ced060dfab 100644 --- a/docs/index.md +++ b/docs/index.md @@ -63,15 +63,11 @@ The following example uses the Docker Hub based `token` discovery service: 1. Start the docker daemon with the `-H` flag. This ensures that the docker remote API on *Swarm Agents* is available over TCP for the *Swarm Manager*. - ```bash - $ docker -H tcp://0.0.0.0:2375 -d - ``` + $ docker -H tcp://0.0.0.0:2375 -d 2. Register the Swarm agents to the discovery service. The node's IP must be accessible from the Swarm Manager. Use the following command and replace with the proper `node_ip` and `cluster_id` to start an agent: - ```bash - `docker run -d swarm join --addr= token://` - ``` + docker run -d swarm join --addr= token:// For example: @@ -82,15 +78,11 @@ The following example uses the Docker Hub based `token` discovery service: 3. Start the Swarm manager on any machine or your laptop. The following command illustrates how to do this: - ```bash - `docker run -d -p :2375 swarm manage token://` - ``` + docker run -d -p :2375 swarm manage token:// 4. Once the manager is running, check your configuration by running `docker info` as follows: - ``` - `docker -H tcp:// info` - ``` + docker -H tcp:// info For example, if you run the manager locally on your machine: @@ -114,19 +106,17 @@ illustrates how to do this: If you are running a test cluster without TLS enabled, you may get an error. In that case, be sure to unset `DOCKER_TLS_VERIFY` with: - ```bash - $ unset DOCKER_TLS_VERIFY - ``` + $ unset DOCKER_TLS_VERIFY ## Using the docker CLI You can now use the regular `docker` CLI to access your nodes: -```bash -$ docker -H tcp:// info -$ docker -H tcp:// run ... -$ docker -H tcp:// ps -$ docker -H tcp:// logs ... +``` +docker -H tcp:// info +docker -H tcp:// run ... +docker -H tcp:// ps +docker -H tcp:// logs ... ``` ## List nodes in your cluster