This is a Oracle image to easily build an Oracle environment for test purposes.
- Download the official Oracle 12cR2 installer on the oracle site
- Put the archive
linuxx64_12201_database.zip
in theinstaller
directory - Execute
docker build -t <image name>:<tag> .
. It will create the image and install Oracle on it. it can take some time.
:info: when new version are release, compare the file db_install.rsp with /u01/app/oracle/product/12.2.0.1/dbhome_1/assistants/dbca/dbca.rsp
in the image
A build of the image is available on the docker hub.
The Oracle instance can be launched with this command :
docker run --name my-database -p 1521:1521 -e ORACLE_SID=sid -e ORACLE_DATABASE=mydb -e ORACLE_USER=myuser -e ORACLE_PASSWORD=mypassword -e ORACLE_DBA_PASSWORD=syspassword exoplatform/oracle:12cR2
This will launch Oracle and initialize the database.
The data are persisted on the directory /u01/app/oracle/data
. To keep them between 2 container restarts, add this parameter to your command line:
-v local_datadir:/u01/app/oracle/data
- ORACLE_SID : The oracle sid used to identified the database (mandatory)
- ORACLE_DATABASE : the name of the database to create (mandatory)
- ORACLE_USER : The standard user name allowed to connect to the database (mandatory)
- ORACLE_PASSWORD : The password of the user (mandatory)
- ORACLE_DBA_PASSWORD : Administrator password (mandatory)
- ORACLE_PGA_TARGET : the memory used by the Program Global Area (default: 512m)
- ORACLE_SGA_TARGET : the memory used by the System Global Area (default: 512m)
As the database initialization can take a long time, for quick tests and if you don't need to keep the data between two restarts, an image with a pre-initialized database is available
docker run --rm --name my-database -p 1521:1521 exoplatform/oracle:12cR2_plf
The parameters are :
- ORACLE_USER : plf
- ORACLE_PASSWORD : plf
- ORACLE_DATABASE : plf
- ORACLE_SID : plf