Adding support for log driver settings and volume bindings #1736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for log driver settings passed through the docker run command.
Docker has various log-drivers and coming with that a couple of log options for each drivers.
As of now, nomad would only support syslog writing to a nomad specific location.
To use nomad in an environment with an existing logging infrastructure like awslog or SPLUNK, it is necessary to pass the right combination of settings to the docker run command.
This PR enables to insert a logging options block in the docker driver config in a nomad manifest.
Furthermore, it is now possible to mount host folders into containers and to use data volume container.
It could look like this:
`config {
image = "redis:latest"
port_map {
db = 6379
}
volumes = ["/path/on/host:/path/in/container", "...", "..."]
volumes_from = [
"datastorage"
]
logging {
type = "syslog"
config {
syslog-address = "tcp://127.0.0.1:1514"
tag = "your/logging/tag/{{.ImageName}}/{{.Name}}"
syslog-format = "rfc3164"
}
}
}`