compose/pkg
Milas Bowman 111ad3b039 fix(publish): add OCI 1.0 fallback support for AWS ECR
Currently, we publish Compose artifacts following the OCI 1.1
specification, which is still in the RC state.

As a result, not all registries support it yet. Most notably,
AWS ECR will reject certain OCI 1.1-compliant requests with
`405 Method Not Supported` with cryptic `Invalid JSON` errors.

This adds initial support for Compose to generate either an
OCI 1.0 or OCI 1.1 compatible manifest. Notably, the OCI 1.0
manifest will be missing the `application/vnd.docker.compose.project`
artifact type, as that does not exist in that version of the
spec. (Less importantly, it uses an empty `ImageConfig`
instead of the newer `application/vnd.oci.empty.v1+json` media
type for the config.)

Currently, this is not exposed as an option (via CLI flags or
env vars). By default, OCI 1.1 is used unless the registry
domain is `amazonaws.com`, which indicates an ECR registry, so
Compose will instead use OCI 1.0.

Moving forward, we should decide how much we want to expose/
support different OCI versions and investigate if there's a
more generic way to feature probe the registry to avoid
maintaining a hardcoded list of domains, which is both tedious
and insufficient.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-12-05 18:08:38 +01:00
..
api [lint] don't use deprecated types 2023-12-05 17:02:37 +01:00
compose fix(publish): add OCI 1.0 fallback support for AWS ECR 2023-12-05 18:08:38 +01:00
e2e Fix configs are mounted under /<id> 2023-11-29 16:53:22 +01:00
mocks add scale command 2023-09-13 11:15:14 +02:00
progress progress: minor correctness fixes (#10871) 2023-08-03 15:14:17 -04:00
prompt use a simpler prompt implementation when we lack a terminal 2023-01-09 10:28:16 +01:00
remote lint 2023-11-02 11:16:35 +01:00
utils logs: fix for missing output on container exit (#10925) 2023-08-23 08:57:18 -04:00
watch deps: remove deprecated github.com/pkg/errors 2023-09-29 06:28:58 +02:00