Skip to content

Commit

Permalink
Add support of tags in the build section
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
  • Loading branch information
glours authored and ulyssessouza committed May 4, 2022
1 parent 54bf07e commit 6b017e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions build.md
Expand Up @@ -382,6 +382,19 @@ Service builds MAY be granted access to multiple secrets. Long and short syntax
same Compose file. Defining a secret in the top-level `secrets` MUST NOT imply granting any service build access to it.
Such grant must be explicit within service specification as [secrets](spec.md#secrets) service element.

### tags

`tags` defines a list of tag mappings that MUST be associated to the build image.

```yml
tags:
"myimage:mytag"
"registry/username/myrepos:my-other-tag"
```

Compose implementations MUST create matching entry with the IP address and hostname in the container's network
configuration, which means for Linux `/etc/hosts` will get extra lines:

## Implementations

* [docker-compose](https://docs.docker.com/compose)
Expand Down
3 changes: 2 additions & 1 deletion schema/compose-spec.json
Expand Up @@ -102,7 +102,8 @@
"shm_size": {"type": ["integer", "string"]},
"extra_hosts": {"$ref": "#/definitions/list_or_dict"},
"isolation": {"type": "string"},
"secrets": {"$ref": "#/definitions/service_config_or_secret"}
"secrets": {"$ref": "#/definitions/service_config_or_secret"},
"tags":{"type": "array", "items": {"type": "string"}}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down

0 comments on commit 6b017e7

Please sign in to comment.