Skip to content

Commit

Permalink
Addressed Windows issues with get started tutorial (docker#4675)
Browse files Browse the repository at this point in the history
* how to get scp to work on Windows

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* clarified some commands in part 3

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* fixed links on hyperv, machine pages

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* removing notes about scp and ssh on Windows, WIP

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* WIP: adding docker-machine env commands

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added docker-machine env option, re-worked tabs

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* moved extra info re: docker-machine env out of note, to end of part 4

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* updated parts 4, 5 with docker-machine env, added note re: commands

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* changed rest of ssh examples, formatting fixes, copyedit

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* copyedit on docker-machine env example

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* reworded note title

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
  • Loading branch information
londoncalling authored Sep 23, 2017
1 parent 95a5f2b commit b764ab3
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 145 deletions.
19 changes: 14 additions & 5 deletions get-started/part3.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,31 @@ Get the service ID for the one service in our application:
docker service ls
```

You'll see output for the `web` service, prepended with your app name. If you
named it the same as shown in this example, the name will be
`getstartedlab_web`. The service ID is listed as well, along with the number of
replicas, image name, and exposed ports.

Docker swarms run tasks that spawn containers. Tasks have state and their own
IDs:
IDs. Let's list the tasks:

```shell
docker service ps <service>
```

>**Note**: Docker's support for swarms is built using a project called SwarmKit. SwarmKit tasks do not need to be containers, but Docker swarm tasks are defined to spawn them.
>**Note**: Docker's support for swarms is built using a project
called SwarmKit. SwarmKit tasks do not need to be containers, but
Docker swarm tasks are defined to spawn them.

Let's inspect one task and limit the output to container ID:
Let's inspect one of these tasks, and limit the output to container ID:

```shell
docker inspect --format='{% raw %}{{.Status.ContainerStatus.ContainerID}}{% endraw %}' <task>
```

Vice versa, inspect the container ID, and extract the task ID:
Vice versa, you can inspect a container ID, and extract the task ID.

First run `docker container ls` to get container IDs, then:

```shell
docker inspect --format="{% raw %}{{index .Config.Labels \"com.docker.swarm.task.id\"}}{% endraw %}" <container>
Expand All @@ -185,7 +194,7 @@ docker container ls -q
You can run `curl http://localhost` several times in a row, or go to that URL in
your browser and hit refresh a few times. Either way, you'll see the container
ID change, demonstrating the load-balancing; with each request, one of
the 5 replicas is chosen, in a round-robin fashion, to respond.
the 5 replicas is chosen, in a round-robin fashion, to respond. The container IDs will match your output from the previous command (`docker container ls -q`).


>**Note**: At this stage, it may take up to 30 seconds for the containers to respond to HTTP
Expand Down
Loading

0 comments on commit b764ab3

Please sign in to comment.