Added notes about container name and UDP/TCP

This commit is contained in:
Chris Bednarski
2015-11-18 16:39:02 -08:00
parent d231a9381e
commit 1dfc320eee

View File

@@ -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.