Last active
November 10, 2025 05:57
-
-
Save enyachoke/afea9f2ba48cd10052787053912b396a to your computer and use it in GitHub Desktop.
update-keycloak-image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to replace docker.io/bitnami/keycloak:22.0.5 with docker.io/bitnamilegacy/keycloak:22.0.5 | |
| # in the specified file. | |
| TARGET_FILE="/var/docker-volumes/ozone/ozone-demo/artifacts/run/docker/docker-compose-keycloak.yml" | |
| FROM_IMAGE="docker.io/bitnami/keycloak:22.0.5" | |
| TO_IMAGE="docker.io/bitnamilegacy/keycloak:22.0.5" | |
| if [ ! -f "$TARGET_FILE" ]; then | |
| echo "File $TARGET_FILE does not exist." | |
| exit 1 | |
| fi | |
| sed -i.bak "s|$FROM_IMAGE|$TO_IMAGE|g" "$TARGET_FILE" | |
| echo "Replacement complete. Backup is saved as $TARGET_FILE.bak" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment