From b77ab76d74443e7e84196cdf16d9c0522564dd43 Mon Sep 17 00:00:00 2001 From: "sammy.huang" Date: Sun, 23 Jun 2024 09:34:07 +0800 Subject: [PATCH] enhance: get environment variable from .env (#34081) Signed-off-by: Liang Huang --- build/build_image.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/build_image.sh b/build/build_image.sh index 68a2cc82f6..9480dcb368 100755 --- a/build/build_image.sh +++ b/build/build_image.sh @@ -23,6 +23,11 @@ set -x # Absolute path to the toplevel milvus directory. toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)") +if [[ -f "$toplevel/.env" ]]; then + set -a # automatically export all variables from .env + source $toplevel/.env + set +a # stop automatically exporting +fi OS_NAME="${OS_NAME:-ubuntu20.04}" MILVUS_IMAGE_REPO="${MILVUS_IMAGE_REPO:-milvusdb/milvus}"