Skip to content

[BUG] v2.36.2 regression: dependent service with image does not get built #12892

Closed

Description

@felipecrs

Description

After upgrading to latest Docker CE 28.2.2, which comes with docker compose 2.36.2, my pipelines started failing and after troubleshooting it, this is why.

Steps To Reproduce

services:
  test1:
    image: test-yada-yada
    pull_policy: build
    build:
      dockerfile_inline: FROM ubuntu
    command:
      - echo
      - "test 1 success"
  test2:
    depends_on:
      test1:
        condition: service_completed_successfully
    image: ubuntu
    command:
      - echo
      - "test 2 success"
❯ docker compose up --wait test2
[+] Running 2/2
 ✔ Network tmpd6vtlxcxic_default    Created                                                                    0.4s 
 ✘ Container tmpd6vtlxcxic-test1-1  Error response from daemon: No such i...                                   0.0s 
Error response from daemon: No such image: test-yada-yada:latest

In 2.36.1 downwards this works normally and docker compose properly builds the dependent image.

Compose Version

Docker Compose version v2.36.2

Docker Environment

Client: Docker Engine - Community
 Version:    28.2.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.24.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.36.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 10
  Running: 6
  Paused: 0
  Stopped: 4
 Images: 27
 Server Version: 28.2.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.6.87.1-microsoft-standard-WSL2
 Operating System: Ubuntu 24.04.2 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 15.62GiB
 Name: FELIPE-DESKTOP
 ID: a764ff55-41e7-48c1-a156-1775b1d02380
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Activity

  1. added a commit that references this issue on May 31, 2025
  2. self-assigned this
    on Jun 2, 2025
  3. felipecrs commented on Jun 2, 2025

    @felipecrs
    Author

    Thanks a lot, @ndeloof!

  4. irdkwmnsb commented on Jun 18, 2025

    @irdkwmnsb

    This just landed in ubuntu-latest worker on github. Took a while to find this issue.
    Posting this here for a dev that might stumble on this:
    Error response from daemon: No such image: imagename:latest

    Possible resolvement:

    Either build the image in a separate step, or don't pass the [SERVICE...] args for compose up
    Use https://github.com/docker/setup-compose-action

  5. felipecrs commented on Jun 18, 2025

    @felipecrs
    Author

    Or better yet, use a newer docker compose version with the fix:

    https://github.com/docker/setup-compose-action

  6. irdkwmnsb commented on Jun 18, 2025

    @irdkwmnsb

    Or better yet, use a newer docker compose version with the fix:

    https://github.com/docker/setup-compose-action

    To my best knowledge there is no way to specify compose version for https://github.com/docker
    setup-buildx-action for example
    And we need the buildx

  7. felipecrs commented on Jun 18, 2025

    @felipecrs
    Author
  8. irdkwmnsb commented on Jun 18, 2025

    @irdkwmnsb

    So it's ok to use both setup-compose-action and setup-buildx-action in a single workflow?

  9. felipecrs commented on Jun 18, 2025

    @felipecrs
    Author

    Yes, one has no intersection with another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions