Skip to content

Commit

Permalink
build: add platforms
Browse files Browse the repository at this point in the history
Closes issue 120

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Jul 6, 2022
1 parent a5cd401 commit 124b38a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build.md
Expand Up @@ -393,6 +393,41 @@ tags:
- "registry/username/myrepos:my-other-tag"
```

### platforms

`platforms` defines a list of target [platforms](spec.md#platform).

```yml
build:
context: .
platforms:
- "linux/amd64"
- "linux/arm64"
```

Compose implementations SHOULD include the native platform in the default target platform list.

Compose implementations SHOULD report an error in the following cases:
* when the list contains multiple platforms but the implementation is incapable of storing multi-platform images
* when the list contains an unsupported platform
```yml
build:
context: .
platforms:
- "linux/amd64"
- "hurd/386"
```
* when the list is non-empty and does not contain the service's platform
```yml
services:
frontend:
platform: linux/amd64
build:
context: .
platforms:
- linux/arm64
```

## Implementations

* [docker-compose](https://docs.docker.com/compose)
Expand Down

0 comments on commit 124b38a

Please sign in to comment.