docker-bakery icon indicating copy to clipboard operation
docker-bakery copied to clipboard

Custom property in image name breaks hierarchy determination

Open cybe opened this issue 5 years ago • 2 comments

Hey,

for my use case I'm including the current branch name within the generated image name. So I use something like FROM {{.DEFAULT_PULL_REGISTRY}}/base/{{.BRANCH}}:{{.BASE_VERSION}} in child images (Full minimal testcase). When determining the hierarchy, this property does not seem to be evaluated properly:

$ docker-bakery build -s major -c config.json -d base/Dockerfile.template -p BRANCH=master

Dockerfiles hierarchy discovered in .
├── scratch
│   └── base
└── {{.BRANCH}}
    └── child

As a result, only base gets build, because child is not being determined as a child of base.

cybe avatar Oct 21 '19 05:10 cybe