{"id":19656469,"url":"https://github.com/daggerok/oracle","last_synced_at":"2026-05-12T08:40:34.776Z","repository":{"id":151041910,"uuid":"127782685","full_name":"daggerok/oracle","owner":"daggerok","description":"Oracle Database automation build for docker hub","archived":false,"fork":false,"pushed_at":"2018-10-02T22:40:39.000Z","size":5221,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T00:43:41.867Z","etag":null,"topics":["docker","docker-image","dockerhub","dockerhub-image","oracle","oracle-11g","oracle-database","oracle-db"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/daggerok/oracle","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-02T16:31:00.000Z","updated_at":"2021-03-23T13:09:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"14398de2-07bd-4fc4-bf9e-5903c8e35b62","html_url":"https://github.com/daggerok/oracle","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Foracle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Foracle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Foracle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Foracle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/oracle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240964824,"owners_count":19885812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","dockerhub","dockerhub-image","oracle","oracle-11g","oracle-database","oracle-db"],"created_at":"2024-11-11T15:27:52.934Z","updated_at":"2026-05-12T08:40:34.736Z","avatar_url":"https://github.com/daggerok.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Oracle Database image:https://travis-ci.org/daggerok/oracle.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/daggerok/oracle\"]\nAutomation build for docker hub\n\n_Oracle XE for rapid development_\n\n- `daggerok/oracle-xe`\n\n_Oracle 11.2.0.2-xe Prebuilt DB (no volumes to commit and push containers)_\n\n- `daggerok/oracle:prebuiltdb`\n\n_Oracle Database 11g Release 2 Express Edition: 11.2.0.2-xe_\n\n- `daggerok/oracle:xe`\n- `daggerok/oracle:latest`\n- `daggerok/oracle:12.1.0.2`\n- `daggerok/oracle:12.1.0.2-xe`\n\n_Oracle Database 12c Release 1 Standard Edition (SE2): 12.1.0.2-se_\n\n- `daggerok/oracle:12.1.0.2-se2`\n- `daggerok/oracle:12.1.0.2-se`\n- `daggerok/oracle:se2`\n- `daggerok/oracle:se`\n- `daggerok/oracle`\n\nNOTE: you can build and prepare same image by yourselves. link:https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance[see details]\n\n== 11.2.0.2 XE for rapid development\n\n.usage\n[source,bash]\n----\ndocker container run \\\n  --shm-size=1g \\\n  -p 8080:8080 -p 1521:1521 \\\n  -it --name oracle-xe \\\n  daggerok/oracle-xe\n----\n\nNOTE: prebuilt `SYSTEM` username and `password` password.\n\n== 11.2.0.2 XE Prebuilt DB\n\n_Sometimes we wanna prepare our own Oracle Database with specific configurations or with some tests data included.\nBut due to default Oracle Docker image\nlink:https://github.com/oracle/docker-images/blob/f847a255a384fd78b187fb0ae7aecee528c36af5/OracleDatabase/SingleInstance/dockerfiles/11.2.0.2/Dockerfile.xe#L81[VOLUME instructions]\nwe link:https://github.com/oracle/docker-images/issues/269[cannot just commit our container] and reuse it later.\nTo fix that issue, I have prepared something for you :)_\n\nTIP: Here a guide how you can use `daggerok/oracle:prebuiltdb` base image to create and quickly run your own reusable\ncontainers\n\n.pull latest prepuiltdb image\n[source,bash]\n----\ndocker pull daggerok/oracle:prebuiltdb\n----\n\n.start container with needed configurations\n[source,bash]\n----\ndocker container run \\\n  --shm-size=1g \\\n  -p 8080:8080 -p 1521:1521 \\\n  -e ORACLE_PWD=password \\\n  -it --name oracle-xe \\\n  daggerok/oracle:prebuiltdb\n----\n\n.wait until oracle database will be ready and gracefully stop oracle-xe container\n[source,bash]\n----\ndocker container stop oracle-xe\n----\n\n.commit container as an reusable image\n[source,bash]\n----\ndocker commit \\\n  -a 'Maksim Kostromin \u003cdaggerok@gmail.com\u003e' \\\n  -m 'Oracle XE with credentials SYSTEM / password' \\\n  oracle-xe daggerok/oracle-xe:latest\n----\n\n.publish image to docker hub\n[source,bash]\n----\ndocker push daggerok/oracle-xe:latest\n----\n\n.now you can re-use it without additional configurations, justl ike so:\n[source,bash]\n----\ndocker container run \\\n  --shm-size=1g \\\n  -p 8080:8080 -p 1521:1521 \\\n  -it --name oracle-xe \\\n  daggerok/oracle-xe\n----\n\n== 11.2.0.2 XE\n\n.usage (docker)\n[sources,bash]\n----\ndocker run -d --rm \\\n  --name oracle-xe \\\n  --shm-size=1g \\\n  -p 1521:1521 \\\n  -e ORACLE_PWD=password \\\n  daggerok/oracle:11.2.0.2-xe\n# daggerok/oracle:11.2.0.2\n# daggerok/oracle:xe\n# daggerok/oracle\n\nParameters:\n  --name         The name of the container (default: auto generated)\n  --shm-size     Amount of Linux shared memory\n  -p             The port mapping of the host port to the container port.\n                 Two ports are exposed: 1521 (Oracle Listener), 8080 (APEX)\n  -e ORACLE_PWD  The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)\n\n  -v /u01/app/oracle/oradata\n\n                 The data volume to use for the database.\n                 Has to be writable by the Unix \"oracle\" (uid: 54321) user inside the container!\n                 If omitted the database will not be persisted over container recreation.\n\n  -v /u01/app/oracle/scripts/startup | /docker-entrypoint-initdb.d\n  -v /u01/app/oracle/scripts/setup   | /docker-entrypoint-initdb.d\n\n                 Optional: A volume with custom scripts to be run after database startup.\n                 For further details see the \"Running scripts after setup and on startup\" section below.\n----\n\n.docker-compose usage (simple)\n[sources,yaml]\n----\nversion: '2.1'\n\nservices:\n  oracle-xe:\n    image: daggerok/oracle\n    shm_size: 1g\n    environment:\n      ORACLE_PWD: password\n      APEX_PORT: 8080\n    ports:\n    - '1521:1521'\n    - '8080:8080'\n    networks: [backing-services]\n    healthcheck:\n      test: curl -uSYSTEM:$$ORACLE_PWD -v http://127.0.0.1:$$APEX_PORT//apex/\n      timeout: 2s\n      retries: 100\n\nnetworks:\n  backing-services:\n    driver: bridge\n----\n\n.docker-compose usage (advanced)\n[sources,yaml]\n----\nversion: \"2.1\"\n\nservices:\n  oracle-xe:\n    image: daggerok/oracle:11.2.0.2-xe\n    shm_size: 1g\n    environment:\n      ORACLE_PWD: password\n    ports:\n    - \"1521:1521\"\n    - \"8080:8080\"\n    volumes:\n    - \"oracle-xe-data:/u01/app/oracle/oradata\"\n    - \"./db-startup-migration-scripts:/u01/app/oracle/scripts/startup\"\n    - \"./db-setup-migration-scripts:/docker-entrypoint-initdb.d/setup\"\n    networks: [backing-services]\n    restart: unless-stopped\n\nvolumes:\n  oracle-xe-data: {}\n\nnetworks:\n  backing-services:\n    driver: bridge\n----\n\n.Running scripts after setup and on startup. Example mounts the local directory `./migrations` to `/opt/oracle/migration-scripts` which is then searched for custom startup scripts:\n[sources,bash]\n----\ndocker run --rm --name oracle-xe \\\n  -p 1521:1521 \\\n  -v $PWD/migrations:/docker-entrypoint-initdb.d/startup \\\n  -v /path/to/oradata:/u01/app/oracle/oradata \\\n  daggerok/oracle:xe\n----\n\n== 12.1.0.2 SE (WIP)\n\n.usage (docker)\n[source,bash]\n----\ndocker run -d --rm --name oracle-se \\\n  --shm-size=1g \\\n  -p 1521:1521 \\\n  -p 5500:5500 \\\n  -e ORACLE_SID=ORCLCDB \\\n  -e ORACLE_PWD=password \\\n  -e ORACLE_PDB=ORCLPDB1 \\\n  -e ORACLE_CHARACTERSET=AL32UTF8 \\\n  daggerok/oracle:12.1.0.2-se2\n# daggerok/oracle:12.1.0.2-se\n# daggerok/oracle\n\nParameters:\n  --name         The name of the container (default: auto generated)\n  --shm-size     Amount of Linux shared memory\n  -p             The port mapping of the host port to the container port.\n                 Two ports are exposed: 1521 (Oracle Listener), 5500 (OEM Express)\n\n  -e ORACLE_SID  The Oracle Database SID that should be used (default: ORCLCDB)  The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)\n  -e ORACLE_PWD  The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)\n  -e ORACLE_PDB  The Oracle Database PDB name that should be used (default: ORCLPDB1)\n  -e ORACLE_CHARACTERSET\n                 The character set to use when creating the database (default: AL32UTF8)\n\n  -v /opt/oracle/oradata\n\n                 The data volume to use for the database.\n                 Has to be writable by the Unix \"oracle\" (uid: 54321) user inside the container!\n                 If omitted the database will not be persisted over container recreation.\n\n  -v /opt/oracle/scripts/startup | /docker-entrypoint-initdb.d\n  -v /opt/oracle/scripts/setup   | /docker-entrypoint-initdb.d\n\n                 Optional: A volume with custom scripts to be run after database startup.\n                 For further details see the \"Running scripts after setup and on startup\" section below.\n----\n\n.docker-compose usage (simple)\n[source,yml]\n----\nversion: \"2.1\"\n\nservices:\n  oracle-se:\n    image: daggerok/oracle\n    shm_size: 1g\n    environment:\n      ORACLE_PWD: password\n    ports: [\"1521:1521\"]\n    networks: [backing-services]\n    #healthcheck:\n    #  test: curl -uSYSTEM:$$ORACLE_PWD -v http://127.0.0.1:8080//apex/\n    #  interval: 15s\n    #  timeout: 2s\n    #  retries: 22\n\nnetworks:\n  backing-services:\n    driver: bridge\n----\n\n.docker-compose usage (advanced)\n[source,yaml]\n----\nversion: \"2.1\"\n\nservices:\n  oracle-se2:\n    image: daggerok/oracle:12.1.0.2-se2\n    shm_size: 1g\n    environment:\n      ORACLE_SID: xe\n      ORACLE_PWD: password\n    ports:\n    - \"1521:1521\"\n    - \"5500:5500\"\n    volumes:\n    - \"oracle-se2-data:/opt/oracle/oradata\"\n    - \"./db-startup-migration-scripts:/opt/oracle/scripts/startup\"\n    - \"./db-setup-migration-scripts:/docker-entrypoint-initdb.d/setup\"\n    networks: [backing-services]\n    restart: unless-stopped\n\nvolumes:\n  oracle-se2-data: {}\n\nnetworks:\n  backing-services:\n    driver: bridge\n----\n\n.Running scripts after setup and on startup. Example mounts the local directory `./migrations` to `/opt/oracle/migration-scripts` which is then searched for custom startup scripts:\n[source,bash]\n----\ndocker run --rm --name oracle-se \\\n  -p 1521:1521 \\\n  -v $PWD/migrations:/opt/oracle/scripts/startup \\\n  -v /home/oracle/oradata:/opt/oracle/oradata \\\n  daggerok/oracle:12.1.0.2-se2\n----\n\n== sqlplus\n\n.sqlplus usage\n[source,bash]\n----\nsqlplus sys/\u003cyour password\u003e@//localhost:1521/\u003cyour SID\u003e as sysdba\nsqlplus system/\u003cyour password\u003e@//localhost:1521/\u003cyour SID\u003e\nsqlplus pdbadmin/\u003cyour password\u003e@//localhost:1521/\u003cYour PDB name\u003e\n----\n\n.sqlplus Mac OS X installation\n[source,bash]\n----\nwget https://github.com/daggerok/oracle/releases/download/oracle/sqlplus-macos.x64-12.2.0.1.0-2.zip\nunzip sqlplus-macos.x64-12.2.0.1.0-2.zip\nexport PATH=$PWD/sqlplus:$PATH\nsqlplus -HV\n----\n\n.sqlplus connection and usage\n[source,bash]\n----\n# docker run ... -e ORACLE_PWD=password ... daggerok/oracle:11.2.0.2-xe\n\nsqlplus system/password@//0.0.0.0/XE\n\nSQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 24 21:38:50 2018\n\nCopyright (c) 1982, 2017, Oracle.  All rights reserved.\n\n\nConnected to:\nOracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production\n\nSQL\u003e select * from dual;\nSQL\u003e ...\nSQL\u003e quit\nDisconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production\n----\n\n== migratioons\n\nThe docker images can be configured to run scripts after setup and on startup.\nCurrently sh and sql extensions are supported.\nFor post-setup scripts just mount the volume /opt/oracle/scripts/setup or extend the image to include scripts in this directory.\nFor post-startup scripts just mount the volume /opt/oracle/scripts/startup or extend the image to include scripts in this directory.\nBoth of those locations are also represented under the symbolic link /docker-entrypoint-initdb.d.\nThis is done to provide synergy with other database Docker images. The user is free to decide whether he wants to put his setup and startup scripts under /opt/oracle/scripts or /docker-entrypoint-initdb.d.\n\nAfter the database is setup and/or started the scripts in those folders will be executed against the database in the container.\nSQL scripts will be executed as sysdba, shell scripts will be executed as the current user.\nTo ensure proper order it is recommended to prefix your scripts with a number.\nFor example, in Flyway-style:\n\n- V201711031__app_v1_initial_DDL.sql\n- V201711032__app_v1_initial_DML.sql\n- V201804021__app_v2_migration_scripts.sql\n- ...\n\nNote: The startup scripts will also be executed after the first time database setup is complete.\n\n=== apply sql migrations manually using sqlplus\n\n_required running oracle in docker, sqlplus installed, bash / cygwin shell_\n\n.try prepared sample with tablespace / user / DDL:\n[source,bash]\n----\n# run oracle for example with ORACLE_PWD: password\n# docker run ... -e ORACLE_PWD=password ... daggerok/oracle:11.2.0.2-xe\n\nwget https://github.com/daggerok/oracle/releases/download/oracle/sqlplus-sample.zip\nunzip -d /tmp sqlplus-sample.zip\nbash /tmp/sqlplus-sample/sqlplus-cmd.bash\n# verify that `my_app` username / password schema should contains groups and users tables...\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Foracle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Foracle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Foracle/lists"}