Skip to content

docker-compose using buildkit fails to fetch local images (already existing or build by another service) #4162

@typoworx-de

Description

@typoworx-de

docker-compose using buildkit fails to fetch local images (already existing or build by another service).

This bug obviously has been discussed here:
docker/compose#3660

I'm still having the issue and found this thread! I don't think disabling Buildkit is a smart hack if one wants to use buildkit-features like COPY --chmod=a+x

The matter that buildkit obviously breaks this is a bug. Has this been reported to buildkit or is the bug located in docker itself?

example:

services:
  build-app:
     image: my-app-base
      context: .
      dockerfile: ./Dockerfile.base
      target: base-image

    run-app:
      image: my-app-project
      build:
        context: .
        dockerfile: ./Dockerfile.project
        target: base-image

FROM my-app-base AS my-project-app

Update
A simple reproducer:
https://github.com/Gabriel-Kaufmann/reproducer-docker-compose-buildx-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions