From 1dfc320eee475a1c43720ee1cbd4316c35d3f345 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 18 Nov 2015 16:39:02 -0800 Subject: [PATCH] Added notes about container name and UDP/TCP --- website/source/docs/drivers/docker.html.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/source/docs/drivers/docker.html.md b/website/source/docs/drivers/docker.html.md index ce9e10866..92cbab07b 100644 --- a/website/source/docs/drivers/docker.html.md +++ b/website/source/docs/drivers/docker.html.md @@ -23,6 +23,9 @@ task "webservice" { driver = "docker" config = { image = "redis" + labels = { + group = "webservice-cache" + } } } ``` @@ -64,6 +67,12 @@ The following options are available for use in the job specification. * `auth` - (Optional) Provide authentication for a private registry (see below). +### Container Name + +Nomad creates a container after pulling an image. Containers are named `{taskName}-{allocId}`. This is necessary in order to place more than one container from the same task on a host (e.g. with count > 1). This also means that each container's name is unique across the cluster. + +This is not configurable. + ### Authentication If you want to pull from a private repo (for example on dockerhub or quay.io), you will need to specify credentials in your job via the `auth` option. @@ -157,6 +166,12 @@ If Nomad allocates port `23332` to your task, the Docker driver will automatical Note that by default this only works with `bridged` networking mode. It may also work with custom networking plugins which implement the same API for expose and port forwarding. +### Networking Protocols + +The Docker driver configures ports on both the `tcp` and `udp` protocols. + +This is not configurable. + ### Other Networking Modes Some networking modes like `container` or `none` will require coordination outside of Nomad. First-class support for these options may be improved later through Nomad plugins or dynamic job configuration.