diff --git a/create_image.sh b/create_image.sh index e297d20..be09f40 100755 --- a/create_image.sh +++ b/create_image.sh @@ -8,6 +8,12 @@ set -uo pipefail # Import environment variables from .env set -o allexport && source .env && set +o allexport +# Check requirements +if ! command -v docker &> /dev/null; then + echo "ERROR: 'docker' command not available. Is Docker installed?" + exit 1 +fi + echo "Building image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG'..." # TIP: Add `--progress=plain` to see the full docker output when you are # troubleshooting the build setup of your image. diff --git a/start_container.sh b/start_container.sh index b1d2f25..3d840bf 100755 --- a/start_container.sh +++ b/start_container.sh @@ -8,6 +8,12 @@ set -uo pipefail # Import environment variables from .env set -o allexport && source .env && set +o allexport +# Check requirements +if ! command -v docker &> /dev/null; then + echo "ERROR: 'docker' command not available. Is Docker installed?" + exit 1 +fi + # Force amd64 as the platform. This workaround is needed on Apple Silicon # machines. Details at https://stackoverflow.com/questions/72152446/. declare -r DOCKER_OPTIONS="--platform linux/amd64"