From 077f8eaf40fd7917ebc90b8577c2766c0000abe6 Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Tue, 19 Mar 2019 16:31:47 +1300 Subject: bootstrap/config.py: add ARG in Dockerfile to allow add sha1sum into docker image Add ARG SHA1SUM, then we can pass it to docker build with --build-arg Signed-off-by: Joe Guo Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- bootstrap/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap/config.py b/bootstrap/config.py index a658fdda223..d78ee02ec30 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -267,6 +267,10 @@ fi DOCKERFILE = r""" FROM {docker_image} +# pass in with --build-arg while build +ARG SHA1SUM +RUN [ -n $SHA1SUM ] && echo $SHA1SUM > /sha1sum.txt + ADD *.sh /tmp/ # need root permission, do it before USER samba RUN /tmp/bootstrap.sh && /tmp/locale.sh -- cgit v1.2.1