aboutsummaryrefslogtreecommitdiff
path: root/docker/cloudkitty/cloudkitty-base
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2026-06-18 17:16:08 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2026-06-24 15:00:26 +0200
commita1a3fdc1b54baf62f234ddc9dac4906e30eb5d11 (patch)
treea4f88789a9ac039db65f9491751c75ca59cebb74 /docker/cloudkitty/cloudkitty-base
parenta437f0bd5f406bf1f82dfdf05c4dac16c02573ff (diff)
downloadkolla-a1a3fdc1b54baf62f234ddc9dac4906e30eb5d11.tar.gz
kolla-a1a3fdc1b54baf62f234ddc9dac4906e30eb5d11.zip
kolla-build: fix build-date LABEL invalidating Docker layer cache
The build-date label was rendered into a LABEL instruction on line 3 of every Dockerfile template, immediately after FROM. Because Docker invalidates the cache for a changed instruction and all subsequent layers, a date change caused a full rebuild of every image on each new calendar day, even when nothing else had changed. Fix this by removing build-date from the Dockerfile templates and applying it as a --label argument at build time via image.labels. Labels passed on the build command line are not part of the Dockerfile cache key, so the date is still recorded in the image metadata without affecting layer caching. Change-Id: I8ef0d85bab1a999a4d09f7cbf0c088ca00fdcf77 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'docker/cloudkitty/cloudkitty-base')
-rw-r--r--docker/cloudkitty/cloudkitty-base/Dockerfile.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2 b/docker/cloudkitty/cloudkitty-base/Dockerfile.j2
index a56370936..b545d4adf 100644
--- a/docker/cloudkitty/cloudkitty-base/Dockerfile.j2
+++ b/docker/cloudkitty/cloudkitty-base/Dockerfile.j2
@@ -1,6 +1,6 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
-LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}"
{% endblock %}
{% block cloudkitty_base_header %}{% endblock %}