mirror of
https://github.com/docker/compose.git
synced 2026-11-17 05:36:08 +00:00
A service reachable only as another service's build additional_contexts must still build even when its own profile is inactive: it's referenced for its image, not started as a workload -- the same tolerance the depends_on consistency check already grants a disabled, non-required dependency, and the same case addBuildDependencies already special-cases on the docker/compose side. compose-go's own consistency check doesn't grant that tolerance yet: it rejects the reference outright, failing the whole project load before addBuildDependencies (or anything else, up included) ever runs -- for up, build and up --no-build alike, exactly as reported. This is expected to fail until compose-go bumps to include compose-spec/compose-go#931. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
20 lines
464 B
YAML
20 lines
464 B
YAML
services:
|
|
base:
|
|
profiles: ["disabled"]
|
|
image: e2e-additional-context-base:latest
|
|
build:
|
|
context: .
|
|
dockerfile_inline: |
|
|
FROM alpine
|
|
RUN echo base > /base-marker
|
|
|
|
classroom:
|
|
profiles: ["classroom"]
|
|
image: e2e-additional-context-classroom:latest
|
|
build:
|
|
context: .
|
|
additional_contexts:
|
|
base: service:base
|
|
dockerfile_inline: |
|
|
FROM base
|
|
ENTRYPOINT ["sleep", "infinity"]
|