Skip to content

Commit cba82a9

Browse files
committed
always pull image before rebuilding local images
1 parent a9901a5 commit cba82a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hack/build-local-images.py

+3
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ def debug(message):
257257
)
258258

259259
debug("Initiating Docker build with Dockerfile:\n{}".format(open(join(context_dir, "Dockerfile")).read()))
260+
# re-pull the original image before building it so we're not accumulating layers each time we
261+
# rebuild the image.
262+
call(["docker", "pull", full_name(image) + ":" + image_config[image]["tag"]])
260263
call(["docker", "build", "-t", full_name(image), "."], cwd=context_dir)
261264

262265
remove(join(context_dir, "Dockerfile"))

0 commit comments

Comments
 (0)