Created
July 29, 2025 12:15
-
-
Save DavideD/3c8ef36c55889084373f652fc5aa07c8 to your computer and use it in GitHub Desktop.
start-db2.sh
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 | |
DATABASE=${1:-'hreact'} | |
USERNAME=${2:-'hreact'} | |
PASSWORD=${3:-'hreact'} | |
NAME='DB2Hibernate' | |
IMAGE='icr.io/db2_community/db2:12.1.2.0' | |
podman run --rm -it --privileged=true -e LICENSE=accept --name $NAME \ | |
-e DBNAME=$DATABASE -e DB2INSTANCE=$USERNAME -e DB2INST1_PASSWORD=$PASSWORD \ | |
-e PERSISTENT_HOME=false -e ARCHIVE_LOGS=false -e ENABLE_ORACLE_COMPATIBILITY=false \ | |
-e IS_OSXFS=false -e HADR_ENABLED=false -e BLU=false -e TO_CREATE_SAMPLEDB=false -e REPODB=false \ | |
-h hostname -p 50000:50000 $IMAGE | |
#podman exec -ti $NAME bash -c "su - $USERNAME -c db2 connect" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment