2022-04-08 08:22:01 +00:00
|
|
|
#! /bin/bash
|
|
|
|
set -euxo pipefail
|
2022-03-21 17:52:00 +00:00
|
|
|
|
|
|
|
VERSION="${1:-latest}"
|
|
|
|
KEYCLOAK_IMAGE="${2:-quay.io/keycloak/keycloak}"
|
2022-04-08 08:22:01 +00:00
|
|
|
KEYCLOAK_CUSTOM_IMAGE="${3:-quay.io/keycloak/custom-keycloak}"
|
2022-03-21 17:52:00 +00:00
|
|
|
|
|
|
|
echo "Using version: $VERSION"
|
|
|
|
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
|
|
|
|
docker build -f ${SCRIPT_DIR}/Dockerfile-custom-image \
|
|
|
|
--build-arg IMAGE=${KEYCLOAK_IMAGE} \
|
|
|
|
--build-arg VERSION=${VERSION} \
|
2022-04-08 08:22:01 +00:00
|
|
|
-t ${KEYCLOAK_CUSTOM_IMAGE}:${VERSION} ${SCRIPT_DIR}
|