Resolve "Ddeploy job failing when enforcing labels"
Closes #52 (closed)
Merge request reports
Activity
30 30 31 31 # generate new image 32 32 if [ -n "${label_args+x}" ]; then 33 run_command="echo \"FROM $image_name\" | docker build $label_args -t $image_name -" 33 run_command="echo \"FROM $image_name\" | DOCKER_BUILDKIT=0 docker build $label_args -t $image_name --pull=false -" Not sure, I'm trying to apply the solution I found in https://stackoverflow.com/questions/20481225/how-can-i-use-a-local-image-as-the-base-image-with-a-dockerfile
I've done some very quick tests locally and in my machine BuildKit does affect the pull behavior, but apparently only when specifying the image ID in the FROM field. That is:
- If I specify the image name it works with or without BuildKit.
- If I specify the image ID it only works with the legacy builder.
--pull=false
doesn't seem to affect one way or another, I think that's the default anyways.changed this line in version 3 of the diff
added 1 commit
- 0536cf0a - Allow changing branch from which pulling enforce_labels
requested review from @miguel.prada
mentioned in merge request !84 (merged)
This message is printed when running a build with
DOCKER_BUILDKIT=0
.DEPRECATED: The legacy builder is deprecated and will be removed in a future release. BuildKit is currently disabled; enable it by removing the DOCKER_BUILDKIT=0 environment-variable.
Using the full image name instead of the ID seems to also fix the problem, even when using BuildKit, see !84 (merged).
See a related test job here (it fails because I hadn't realized there were more uses of
DOCKER_ID
, hopefully this other job "passes").