-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose build results in repository pull errors for local images #9232
Comments
It seems build fails while pulling the base image use in your service's Dockerfile. |
@ndeloof Indeed it does work, as mentioned. Just run ./build.sh |
Ok got it. |
it seems this buildx limitation has a workaround: https://github.com/docker/buildx/blob/v0.8.0-rc1/docs/reference/buildx_bake.md#using-a-result-of-one-target-as-a-base-image-in-another-target |
Ran a quick prototype: |
I'm wondering, why did this previously work then? I mean I originally setup my project to use buildkit features (e.g. --mount), so it would have never worked if buildkit was always doing it the way it is now. |
docker-compose v1 run builds sequentially, so even with buidlkit enabled, you get base images to have been built when service image build is triggered |
@ndeloof So my impression is that this is being considered an issue to fix then yes? |
Yes this is an issue we'd like to fix, but the fix is not trivial. Work on progress |
@ndeloof Yep, understood. I can visualize how it might be difficult. Perhaps some sort of centralized cache/query code that determines if something needs building before hand? That's a wild ass guess, I have never looked at the code, lol. |
duplicates #8538 |
When using the "classic" (non-BuildKit) builder, ensure that services are iterated in dependency order for a build so that it's possible to guarantee the presence of a base image that's been added as a dependency with `depends_on`. This is a very common pattern when using base images with Compose. A fix for BuildKit is blocked currently until we can rely on a newer version of the engine (see docker#9324)[^1]. [^1]: docker#9232 (comment) Signed-off-by: Milas Bowman <[email protected]>
When using the "classic" (non-BuildKit) builder, ensure that services are iterated in dependency order for a build so that it's possible to guarantee the presence of a base image that's been added as a dependency with `depends_on`. This is a very common pattern when using base images with Compose. A fix for BuildKit is blocked currently until we can rely on a newer version of the engine (see docker#9324)[^1]. [^1]: docker#9232 (comment) Signed-off-by: Milas Bowman <[email protected]>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it had not recent activity during the stale period. |
Problem is still there. I had these problems too. I figured out later it obviously is related to the problem adressed in this ticket as well. See my ticket here: moby/buildkit#4162 |
docker-compose build results in repository pull errors for local images
Sample broken project at: https://github.com/TrentonAdams/compose-bug
According to the docker compose documentation
It used to do just that, but now it just breaks.
Running this just works...
Running this fails with repository pull errors...
The project this sample project is based off of has been virtually untouched for a couple of years, but now it's not working the way that it used to. Docker compose seems to have a regression.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
Completion of the build
Output of
docker compose version
:Output of
docker info
:Additional environment details:
The text was updated successfully, but these errors were encountered: