Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1004] fix(dev): The shell scripts of Docker doesn't work in the Ubuntu (#1019)

qqqttt12318fc0b29b75d
diff --git a/dev/docker/build-docker.sh b/dev/docker/build-docker.sh
index f7a23e2622..29a4f9cfbf 100755
--- a/dev/docker/build-docker.sh
+++ b/dev/docker/build-docker.sh
@@ -3,12 +3,12 @@
# Copyright 2023 Datastrato.
# This software is licensed under the Apache License version 2.
#
-set -ex
+#set -ex
script_dir="$(dirname "${BASH_SOURCE-$0}")"
script_dir="$(cd "${script_dir}">/dev/null; pwd)"
-
# Build docker image for multi-arch
-USAGE="-e Usage: ./build-docker.sh --platform [all|linux/amd64|linux/arm64] --type [gravitino|hive|trino] --image {image_name} --tag {tag_name} --latest"
+# shellcheck disable=SC2089
+USAGE="Usage: ./build-docker.sh --platform [all|linux/amd64|linux/arm64] --type [gravitino|hive|trino] --image {image_name} --tag {tag_name} --latest\nNotice: You shouldn't use 'all' for the platform if you don't use the Github action to publish the Docker image."
# Get platform type
if [[ "$1" == "--platform" ]]; then
diff --git a/dev/docker/playground/launch-playground.sh b/dev/docker/playground/launch-playground.sh
index f86b0225c2..4b95ddc87c 100755
--- a/dev/docker/playground/launch-playground.sh
+++ b/dev/docker/playground/launch-playground.sh
@@ -7,7 +7,8 @@
playground_dir="$(dirname "${BASH_SOURCE-$0}")"
playground_dir="$(cd "${playground_dir}">/dev/null; pwd)"
-if command -v docker-compose &> /dev/null
+isExist=`which docker-compose`
+if [ $isExist ]
then
true # Placeholder, do nothing
else
@@ -19,4 +20,4 @@ cd ${playground_dir}
docker-compose up
# Clean Docker containers when you quit this script
-docker-compose down
\ No newline at end of file
+docker-compose down