mirror of https://github.com/docker/docs.git
Add a note on service discovery on swarm
This commit is contained in:
parent
16175e23dd
commit
72f9b29cde
|
@ -280,6 +280,10 @@ routing on the individual Docker daemon hosts.
|
|||
| `-p 8080:80/udp` | Map UDP port 80 in the container to port 8080 on the overlay network. |
|
||||
| `-p 8080:80/tcp -p 8080:80/udp` | Map TCP port 80 in the container to TCP port 8080 on the overlay network, and map UDP port 80 in the container to UDP port 8080 on the overlay networkt. |
|
||||
|
||||
### Container discovery
|
||||
|
||||
For most situations, you should connect to the service name, which is load-balanced and will be handled by all containers ("tasks") backing the service.
|
||||
If you need to get a list of all tasks backing the service you can do a DNS lookup for tasks.<service-name>.
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
Loading…
Reference in New Issue