Skip to content

Commit ee3b16c

Browse files
authored
docs: revert to labels={"foo.bar": "baz"} style (#26793)
Backport of the docs portion of #26535 Replaces #26591
1 parent d51eecc commit ee3b16c

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

website/content/docs/drivers/docker.mdx

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ task "webservice" {
2323
2424
config {
2525
image = "redis:7"
26-
labels {
26+
labels = {
2727
group = "webservice-cache"
2828
}
2929
}
@@ -216,28 +216,13 @@ The `docker` driver supports the following configuration in the job spec. Only
216216

217217
```hcl
218218
config {
219-
labels {
219+
labels = {
220220
foo = "bar"
221-
zip = "zap"
221+
"quote.dotted.keys" = "zap"
222222
}
223223
}
224224
```
225225

226-
A more verbose syntax must be used to specify labels with keys that require
227-
quoting. For example DataDog's autodiscovery mechanism looks for labels with
228-
dots in the key which must be quoted:
229-
230-
```hcl
231-
config {
232-
labels = [
233-
{
234-
"com.datadoghq.ad.check_names" = "[\"openmetrics\"]"
235-
"com.datadoghq.ad.init_configs" = "[{}]"
236-
}
237-
]
238-
}
239-
```
240-
241226
- `load` - (Optional) Load an image from a `tar` archive file instead of from a
242227
remote repository. Equivalent to the `docker load -i <filename>` command. If
243228
you're using an `artifact` block to fetch the archive file, you'll need to
@@ -424,7 +409,7 @@ The `docker` driver supports the following configuration in the job spec. Only
424409
readonly = false
425410
volume_options {
426411
no_copy = false
427-
labels {
412+
labels = {
428413
foo = "bar"
429414
}
430415
driver_config {

0 commit comments

Comments
 (0)