compose/pkg/api
Milas Bowman 636c13f818 build: do not attempt to push unnamed service images
When building, if images are being pushed, ensure that only
named images (i.e. services with a populated `image` field)
are attempted to be pushed.

Services without `image` get an auto-generated name, which
will be a "Docker library" reference since they're in the
format `$project-$service`, which is implicitly the same as
`docker.io/library/$project-$service`. A push for that is
never desirable / will always fail.

The key here is that we cannot overwrite the `<svc>.image`
field when doing builds, as we need to be able to check for
its presence to determine whether a push makes sense.

Fixes #10813.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-07-19 09:58:37 +02:00
..
api.go build: do not attempt to push unnamed service images 2023-07-19 09:58:37 +02:00
api_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
dryrunclient.go don't use unitialized cli to setup DryRunClient 2023-07-06 14:27:57 +02:00
errors.go Add gocritic to linters 2022-07-13 19:33:03 +02:00
errors_test.go move compose API into pkg/api 2021-06-15 15:52:48 +02:00
io.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
labels.go detect replacement container is created and inform printer so it attach and don't stop 2023-02-06 11:23:13 +01:00
proxy.go fix some comments 2023-07-04 11:34:49 +08:00