From 5493517b4f264fdadbcb43875b9a7268b904ea50 Mon Sep 17 00:00:00 2001 From: Carlos Venegas Date: Fri, 19 Mar 2021 16:33:46 +0000 Subject: [PATCH] qemu: add CACHE_TIMEOUT Add docker ARG to provide a date to invalid cache, if the date changes the image will be rebuild. This is required to keep build dependencies with security fixes, but still take advantage of build qemu faster using docker cache. Signed-off-by: Carlos Venegas --- tools/packaging/static-build/qemu/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/packaging/static-build/qemu/Dockerfile b/tools/packaging/static-build/qemu/Dockerfile index 7fa291590..d5dece8e2 100644 --- a/tools/packaging/static-build/qemu/Dockerfile +++ b/tools/packaging/static-build/qemu/Dockerfile @@ -12,6 +12,12 @@ ARG QEMU_TARBALL ARG PREFIX WORKDIR /root/qemu + +# CACHE_TIMEOUT: date to invalid cache, if the date changes the image will be rebuild +# This is required to keep build dependencies with security fixes. +ARG CACHE_TIMEOUT +RUN echo "$CACHE_TIMEOUT" + RUN apt-get update && apt-get upgrade -y RUN apt-get --no-install-recommends install -y \ apt-utils \