-
Notifications
You must be signed in to change notification settings - Fork 622
Closed
Labels
Description
It would be useful for bake to automatically determine dependencies during the build phase. For example:
==> docker-bake.hcl <==
target "sleep" {
tags = ["localhost:5000/sleep"]
dockerfile = "Dockerfile.sleep"
output = ["type=registry"]
}
target "main" {
tags = ["localhost:5000/main"]
dockerfile = "Dockerfile.main"
output = ["type=registry"]
}
group "all" {
targets = ["sleep","main",]
}
==> Dockerfile.main <==
FROM localhost:5000/sleep
==> Dockerfile.sleep <==
FROM alpine
RUN sleep 10
On a fresh build, this will fail with failed to solve: rpc error: code = Unknown desc = failed to load cache key: localhost:5000/sleep:latest: not found
On a build where sleep already exists, we may still want this ordering, to ensure we are getting the newly built sleep rather than the existing remote one.
Reactions are currently unavailable