Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/bundler/nokogiri-1.13.6
Browse files Browse the repository at this point in the history
  • Loading branch information
EricHripko committed Sep 3, 2022
2 parents 3fdf561 + 3ce7e88 commit 0c9e74e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -245,7 +245,7 @@ GEM
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
tzinfo (1.2.10)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
Expand Down
52 changes: 44 additions & 8 deletions build.md
Expand Up @@ -9,7 +9,7 @@
## Introduction

Compose specification is a platform-neutral way to define multi-container applications. A Compose implementation
focussing on development use-case to run application on local machine will obviously also support (re)building
focusing on development use-case to run application on local machine will obviously also support (re)building
application from sources. The Compose Build specification allows to define the build process within a Compose file
in a portable way.

Expand Down Expand Up @@ -73,9 +73,9 @@ services:

When used to build service images from source, such a Compose file will create three docker images:

* `awesome/webapp` docker image is build using `webapp` sub-directory within Compose file parent folder as docker build context. Lack of a `Dockerfile` within this folder will throw an error.
* `awesome/database` docker image is build using `backend` sub-directory within Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to context path, which means for this sample `..` will resolve to Compose file parent folder, so `backend.Dockerfile` is a sibling file.
* a docker image is build using `custom` directory within user's HOME as docker context. Compose implementation warn user about non-portable path used to build image.
* `awesome/webapp` docker image is built using `webapp` sub-directory within Compose file parent folder as docker build context. Lack of a `Dockerfile` within this folder will throw an error.
* `awesome/database` docker image is built using `backend` sub-directory within Compose file parent folder. `backend.Dockerfile` file is used to define build steps, this file is searched relative to context path, which means for this sample `..` will resolve to Compose file parent folder, so `backend.Dockerfile` is a sibling file.
* a docker image is built using `custom` directory within user's HOME as docker context. Compose implementation warn user about non-portable path used to build image.

On push, both `awesome/webapp` and `awesome/database` docker images are pushed to (default) registry. `custom` service image is skipped as no `Image` attribute is set and user is warned about this missing attribute.

Expand All @@ -101,7 +101,7 @@ Alternatively `build` can be an object with fields defined as follow

When the value supplied is a relative path, it MUST be interpreted as relative to the location of the Compose file.
Compose implementations MUST warn user about absolute path used to define build context as those prevent Compose file
for being portable.
from being portable.

```yml
build:
Expand All @@ -112,7 +112,7 @@ build:

`dockerfile` allows to set an alternate Dockerfile. A relative path MUST be resolved from the build context.
Compose implementations MUST warn user about absolute path used to define Dockerfile as those prevent Compose file
for being portable.
from being portable.

```yml
build:
Expand Down Expand Up @@ -313,11 +313,11 @@ build:
```

### secrets
`secrets` grants access to sensitive data defined by [secrets](secrets) on a per-service build basis. Two
`secrets` grants access to sensitive data defined by [secrets](spec.md#secrets) on a per-service build basis. Two
different syntax variants are supported: the short syntax and the long syntax.

Compose implementations MUST report an error if the secret isn't defined in the
[`secrets`](#secrets-top-level-element) section of this Compose file.
[`secrets`](spec.md#secrets-top-level-element) section of this Compose file.

#### Short syntax

Expand Down Expand Up @@ -393,6 +393,42 @@ 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"
```

When the `platforms` attribute is omitted, Compose implementations MUST include the service's platform
in the list of the default build target platforms.

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"
- "unsupported/unsupported"
```
* 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
10 changes: 5 additions & 5 deletions spec.md
Expand Up @@ -268,7 +268,7 @@ available resources.

Deploy support is an OPTIONAL aspect of the Compose specification, and is
described in detail in the [Deployment support](deploy.md) documentation.
not implemented the Deploy section SHOULD be ignored and the Compose file MUST still be considered valid.
If not implemented the Deploy section SHOULD be ignored and the Compose file MUST still be considered valid.

### build

Expand Down Expand Up @@ -415,7 +415,7 @@ cgroup_parent: m-executor-abcd

### command

`command` overrides the the default command declared by the container image (i.e. by Dockerfile's `CMD`).
`command` overrides the default command declared by the container image (i.e. by Dockerfile's `CMD`).

```
command: bundle exec thin -p 3000
Expand Down Expand Up @@ -1601,13 +1601,13 @@ web:

### scale

-DEPRECATED: use [deploy/replicas](deploy.md#replicas)_
_DEPRECATED: use [deploy/replicas](deploy.md#replicas)_

`scale` specifies the default number of containers to deploy for this service.

### secrets

`secrets` grants access to sensitive data defined by [secrets](secrets) on a per-service basis. Two
`secrets` grants access to sensitive data defined by [secrets](#secrets) on a per-service basis. Two
different syntax variants are supported: the short syntax and the long syntax.

Compose implementations MUST report an error if the secret doesn't exist on the platform or isn't defined in the
Expand Down Expand Up @@ -1653,7 +1653,7 @@ the service's containers.
The following example sets the name of the `server-certificate` secret file to `server.crt`
within the container, sets the mode to `0440` (group-readable) and sets the user and group
to `103`. The value of `server-certificate` secret is provided by the platform through a lookup and
the secret lifecycle not directly managed by the Compose implementation.
the secret lifecycle is not directly managed by the Compose implementation.

```yml
services:
Expand Down

0 comments on commit 0c9e74e

Please sign in to comment.