diff --git a/images/chromium-headful/build-docker.sh b/images/chromium-headful/build-docker.sh index c0d9485d..ff92a6f8 100755 --- a/images/chromium-headful/build-docker.sh +++ b/images/chromium-headful/build-docker.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -ex -o pipefail +set -e -o pipefail # Move to the script's directory so relative paths work regardless of the caller CWD SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) diff --git a/shared/start-buildkit.sh b/shared/start-buildkit.sh index baca56c4..f7b67890 100755 --- a/shared/start-buildkit.sh +++ b/shared/start-buildkit.sh @@ -6,8 +6,7 @@ export KRAFTKIT_BUILDKIT_HOST=docker-container://buildkit # Install container if not already installed. -docker container inspect buildkit > /dev/null 2>&1 -if test $? -eq 0; then +if [ -n "$(docker ps --all --no-trunc --quiet --filter 'name=^buildkit$')" ]; then echo "Container 'buildkit' is already installed. Nothing to do." else echo "Installing 'buildkit' container ... " @@ -15,11 +14,10 @@ else return $? fi -test "$(docker container inspect -f '{{.State.Running}}' buildkit 2> /dev/null)" = "true" -if test $? -eq 0; then - echo "Container 'buidlkitd' is already running. Nothing to do." +if [ "$(docker container inspect -f '{{.State.Running}}' buildkit 2> /dev/null)" = "true" ]; then + echo "Container 'buildkit' is already running. Nothing to do." else echo "Starting 'buildkit' container ... " docker start buildkit return $? -fi \ No newline at end of file +fi