Skip to main content

Multiple datastores with Spring Boot

To access oracle maven repository please use nu.studer:gradle-credentials-plugin plugin to store Oracle credentials:

classpath(“nu.studer:gradle-credentials-plugin:${studerCredentials}”)

For example add following keys and values to

gradle addCredentials –key ORA_USERNAME –value [email protected]
gradle addCredentials –key ORA_PASSWORD –value ORA_PASSWORD=’password’

In gradle file GRADLE_USER_HOME/gradle.encrypted.properties stores values which you added:

ORA_USERNAME=Js0cWBI10mP8FqBu+ItLe6xRaLf8O5G10+ypKe2d+yw\=
ORA_PASSWORD=tB+C6vps8hSXYXj3f5T3h5boo3z1l4iog1mW+sLyMtI\=

Let’s build Oracle DB single express instance:

git clone https://github.com/oracle/docker-images.git

then

cd docker-images/OracleDatabase/SingleInstance/dockerfiles/
mv ~/Downloads/oracle-xe-11.2.0-1.0.x86_64.rpm.zip 11.2.0.2/

build specific version

./buildDockerImage.sh -v 11.2.0.2 -x

And run it:

docker run –name ora-xe –shm-size=1g \
-p 11521:1521 -p 15500:5500 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=Pass1 \
-e ORACLE_CHARACTERSET=AL32UTF8 \
-e ORACLE_PASSSWORD=Qwe123 \
-e ORACLE_CONFIRM_PASSWORD=Qwe123 \
-v /opt/oracle/oradata \
oracle/database:11.2.0.2-xe

and

sqlplus sys/@//localhost:1521/XE as sysdba
sqlplus system/@//localhost:1521/XE