Docker Oracle
docker pull gvenzl/oracle-xe
Run a new database container:
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=<your password> gvenzl/oracle-xe
Run a new persistent 18c database container:
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=<your password> -v oracle-volume:/opt/oracle/oradata gvenzl/oracle-xe
Run a new persistent 11g R2 database container:
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=<your password> -v oracle-volume:/u01/app/oracle/oradata gvenzl/oracle-xe:11
Reset database SYS
and SYSTEM
passwords:
docker exec <container name|id> resetPassword <your password>
docker pull ghcr.io/oracle/oraclelinux8-instantclient:19
ghcr.io/oracle/oraclelinux8-instantclient
docker run -ti --rm ghcr.io/oracle/oraclelinux8-instantclient:19 sqlplus hr@example.com/orclpdb1
Optional Oracle Network and Oracle client configuration files can be copied or mounted to the default configuration file directory /usr/lib/oracle/<version>/client64/lib/network/admin
. Optional files include tnsnames.ora
, sqlnet.ora
, oraaccess.xml
and cwallet.sso
.
ORA_INSTACLIENT_URL=
https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-sqlplus-19.12.0.0.0-1.x86_64.rpm
wget -O oracle-instantclient.rpm ${ORA_INSTACLIENT_URL}
apt-get update
apt-get install -y --no-install-recommends \ | |
alien \ | |
gettext-base \ | |
libaio1 |
alien -i oracle-instantclient.rpmsqlplus username/password@//dbhost:1521/SIDapt-get install libaio1export LD_LIBRARY_PATH=/usr/lib/oracle/19.12/client64/lib
FINAL: The below command to install in Ubantu
apt-get update apt-get install libaio1 apt-get install -y alien ORA_INSTACLIENT_URL=https://download.oracle.com/otn_software/linux/instantclient/213000/oracle-instantclient-basic-21.3.0.0.0-1.el8.x86_64.rpm wget -O oracle-instantclient.rpm ${ORA_INSTACLIENT_URL} ORA_INSTACLIENT_URL=https://download.oracle.com/otn_software/linux/instantclient/213000/oracle-instantclient-sqlplus-21.3.0.0.0-1.el8.x86_64.rpm wget -O oracle-instantclient_qlplus.rpm ${ORA_INSTACLIENT_URL} alien -i oracle-instantclient.rpm oracle-instantclient_sqlplus.rpm export ORACLE_HOME=/usr/lib/oracle/21/client64 export LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib apt-get install libaio1 sqlplus sqlplus username/password@//dbhost:1521/SID
Comments