HUB
Sign inSign up

logycon/oracle-xe

By logycon

•Updated almost 5 years ago

Dockerized oracle-xe

Image
0

82

logycon/oracle-xe repository overview

⁠Image is based on Oracle's SingleInstance setup:

https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/README.md⁠

⁠Sample docker-compose:
version: '3'

services:
  oracle-xe:
    image: oracle-xe:11.2.0.2 
    container_name: oracle-xe
    environment:
      ORACLE_SID: XE
      ORACLE_PDB: XED
      ORACLE_PWD: system
    volumes:
      - ./oracle-xe-setup:/u01/app/oracle/scripts/setup/
      - ./setup:/tmp/setup
    ports:
      - '1521:1521'
      - '5500:5500'
    expose:
      - '1521'
      - '5500'
    shm_size: 1g

ORACLE_PWD sets up password for SYS and SYSTEM.

⁠Volumes:
⁠./oracle-xe-setup

Container will run shell scrips placed in this directory during sever setup phase. You can create dbs, users, load backups, etc. For example:

⁠setupdb.sh
exit | sqlplus -S system/system@XE @/tmp/setup/createuser.sql
imp system/system@XE FILE=/tmp/setup/backup.dmp FROMUSER=MYUSER TOUSER=MYUSER
⁠./setup

Setup support directory where you can place files referenced in oracle-xe-setup, for example:

⁠createuser.sql
CREATE USER MYUSER IDENTIFIED BY MYUSER;
GRANT CONNECT TO MYUSER;
GRANT CONNECT, RESOURCE, DBA TO MYUSER;
GRANT CREATE SESSION GRANT ANY PRIVILEGE TO MYUSER;
GRANT UNLIMITED TABLESPACE TO MYUSER;
⁠backup.dmp

[your db's backup dump]

Tag summary
Recent tags
Content type
Image
Digest
Size
693.9 MB
Last updated
almost 5 years ago
docker pull logycon/oracle-xe:11.2.0.2