compose/cmd/compose
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
..
alpha.go move dry-run support from alpha to main command 2023-05-15 09:39:46 +02:00
build.go add support of --builder and BUILDX_BUILDER 2023-07-03 10:11:18 +02:00
completion.go update projectOptions to be public by renaming it to ProjectOptions 2022-12-20 08:53:27 +01:00
compose.go support `attach` 2023-07-10 14:34:28 +02:00
compose_test.go add support for `restart` for `depends_on` 2023-02-18 12:55:29 +01:00
config.go build: do not attempt to push unnamed service images 2023-07-19 09:58:37 +02:00
cp.go when --index is not set select first service container 2023-07-07 14:08:24 +02:00
create.go Add `--scale` to `compose create`, refactor scale option 2023-01-26 13:03:34 +01:00
down.go cli: fix timeout behavior on up / restart / stop (#10672) 2023-06-12 09:18:25 -04:00
events.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
exec.go when --index is not set select first service container 2023-07-07 14:08:24 +02:00
images.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
kill.go `parallel` flag belong do top-level "compose" cobra command, not the current one 2023-05-15 20:57:09 +02:00
list.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
logs.go alias -n for --tail to align with docker CLI 2023-01-26 10:00:58 +01:00
pause.go update projectOptions to be public by renaming it to ProjectOptions 2022-12-20 08:53:27 +01:00
port.go when --index is not set select first service container 2023-07-07 14:08:24 +02:00
ps.go check service names based on project, not running containers 2022-12-21 21:11:44 +01:00
ps_test.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
pull.go update compose-go 2023-03-01 17:14:53 +01:00
push.go update compose-go 2023-03-01 17:14:53 +01:00
remove.go workaround race condition in ContainerList 2023-03-28 12:28:41 +02:00
restart.go cli: fix timeout behavior on up / restart / stop (#10672) 2023-06-12 09:18:25 -04:00
run.go Apply no-deps before we select and mutate target service 2023-07-10 14:37:42 +02:00
start.go update projectOptions to be public by renaming it to ProjectOptions 2022-12-20 08:53:27 +01:00
stop.go cli: fix timeout behavior on up / restart / stop (#10672) 2023-06-12 09:18:25 -04:00
top.go don't assume os.Stdout and rely on dockerCLI.streams 2022-12-20 23:52:25 +01:00
up.go support `attach` 2023-07-10 14:34:28 +02:00
up_test.go Add `--scale` to `compose create`, refactor scale option 2023-01-26 13:03:34 +01:00
version.go progress writer uses dockercli.Err stream 2023-03-15 09:47:13 +01:00
viz.go Added tests to `viz` subcommand 2023-04-24 12:18:37 +02:00
viz_test.go Added tests to `viz` subcommand 2023-04-24 12:18:37 +02:00
wait.go Add `docker compose wait` 2023-06-30 16:07:03 +02:00
watch.go introduce experimental watch command (skeletton) 2023-01-12 10:52:58 +01:00