Merge "Support --base-image"
diff --git a/build b/build
index ced717a..c00da76 100755
--- a/build
+++ b/build
@@ -1,8 +1,9 @@
 #!/bin/bash
+BASE_IMAGE=alpine:3.16.1
 
 usage() {
     me=`basename "$0"`
-    echo >&2 "Usage: $me [--help] [--tag TAG] [--gerrit-url URL] [IMAGE]"
+    echo >&2 "Usage: $me [--help] [--tag TAG] [--gerrit-url URL] [--base-image IMAGE] [IMAGE]"
     exit 1
 }
 
@@ -30,6 +31,12 @@
     shift
     ;;
 
+  --base-image)
+    shift
+    BASE_IMAGE=$1
+    shift
+    ;;
+
   *)
     break
   esac
@@ -93,7 +100,7 @@
 REPORT="Build results: \n"
 RETURN_CODE=0
 
-docker build --platform=linux/amd64 -t base:$REV ./container-images/base
+docker build --build-arg BASE_IMAGE="$BASE_IMAGE" --platform=linux/amd64 -t base:$REV ./container-images/base
 if test $? -ne 0; then
     echo -e "\n\nFailed to build base image."
     exit 1
diff --git a/container-images/base/Dockerfile b/container-images/base/Dockerfile
index 76ea32e..2ea8939 100644
--- a/container-images/base/Dockerfile
+++ b/container-images/base/Dockerfile
@@ -1,4 +1,5 @@
-FROM alpine:3.16.1
+ARG BASE_IMAGE
+FROM $BASE_IMAGE
 
 ENV LC_ALL=C.UTF-8
 ENV LANG=C.UTF-8