docker run -d --name oracle -p 11521:1521 -p 18080:8080 --shm-size=1g -e ORACLE_PWD=Admin_1234 itsma/oracle:11.2
Parameters: --name: The name of the container (default: auto generated) --shm-size: Amount of Linux shared memory -p: The port mapping of the host port to the container port. Two ports are exposed: 1521 (Oracle Listener), 8080 (APEX) -e ORACLE_PWD: The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)
-v /u01/app/oracle/oradata The data volume to use for the database. Has to be writable by the Unix "oracle" (uid: 54321) user inside the container! If omitted the database will not be persisted over container recreation. -v /u01/app/oracle/scripts/startup | /docker-entrypoint-initdb.d Optional: A volume with custom scripts to be run after database startup. For further details see the "Running scripts after setup and on startup" section below. -v /u01/app/oracle/scripts/setup | /docker-entrypoint-initdb.d Optional: A volume with custom scripts to be run after database startup. For further details see the "Running scripts after setup and on startup" section below. On the first startup of the container a random password will be generated for the database if not provided. You can find this password in the output line:
ORACLE PASSWORD FOR SYS AND SYSTEM: Note: The ORACLE_SID for Express Edition is always XE and cannot be changed, hence there is no ORACLE_SID parameter provided for the XE build.
The password for those accounts can be changed via the docker exec command. Note, the container has to be running: docker exec oraclexe /u01/app/oracle/setPassword.sh
Once the container has been started you can connect to it just like to any other database:
sqlplus sys/@//localhost:1521/XE as sysdba sqlplus system/@//localhost:1521/XE
Content type
Image
Digest
Size
680.1 MB
Last updated
over 8 years ago
docker pull leopardxu/oracledb:11.2