GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — java-docker-build-tutorial/create_image.sh at main · Krishna-skk/java-docker-build-tutorial Expand file tree/ Copy pathcreate_image.shMore file actions executable file ·26 lines (22 loc) · 1.02 KB / Copy pathcreate_image.shFile metadata and controlsexecutable file ·26 lines (22 loc) · 1.02 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #!/usr/bin/env bash # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ # `-u`: Errors if a variable is referenced before being set # `-o pipefail`: Prevent errors in a pipeline (`|`) from being masked 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. # # 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" # Use BuildKit, i.e. `buildx build` instead of just `build` # https://docs.docker.com/build/ docker buildx build $DOCKER_OPTIONS -t "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG" . |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |