mirror of
https://github.com/docker/compose.git
synced 2025-08-19 00:28:16 +02:00
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/compose#9324)[^1]. [^1]: https://github.com/docker/compose/issues/9232#issuecomment-1060389808 Signed-off-by: Milas Bowman <milas.bowman@docker.com>
13 lines
201 B
YAML
13 lines
201 B
YAML
services:
|
|
base:
|
|
image: base
|
|
build:
|
|
context: .
|
|
dockerfile: base.dockerfile
|
|
service:
|
|
depends_on:
|
|
- base
|
|
build:
|
|
context: .
|
|
dockerfile: service.dockerfile
|