{"id":13464865,"url":"https://github.com/bofm/docker-oracle12c","last_synced_at":"2025-03-25T11:32:17.648Z","repository":{"id":30857864,"uuid":"34415404","full_name":"bofm/docker-oracle12c","owner":"bofm","description":"Docker image for Oracle Database 12c","archived":false,"fork":false,"pushed_at":"2017-08-08T10:03:39.000Z","size":53,"stargazers_count":70,"open_issues_count":0,"forks_count":70,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-29T17:56:01.712Z","etag":null,"topics":["database","docker","oracle","oracle-database"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/bofm.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2015-04-22T20:55:03.000Z","updated_at":"2024-10-13T11:30:59.000Z","dependencies_parsed_at":"2022-08-22T20:11:14.579Z","dependency_job_id":null,"html_url":"https://github.com/bofm/docker-oracle12c","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bofm%2Fdocker-oracle12c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bofm%2Fdocker-oracle12c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bofm%2Fdocker-oracle12c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bofm%2Fdocker-oracle12c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bofm","download_url":"https://codeload.github.com/bofm/docker-oracle12c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245454261,"owners_count":20617996,"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":["database","docker","oracle","oracle-database"],"created_at":"2024-07-31T14:00:51.865Z","updated_at":"2025-03-25T11:32:12.626Z","avatar_url":"https://github.com/bofm.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"## Goals\n* Provide an easy way to build a lightweight [Docker](http://www.docker.com/) image for [Oracle Database](http://docs.oracle.com/database/121/index.htm).\n* Just run a database and skip the complexities of installation and configuration.\n\n## Features\n* `docker run` creates and starts up a new database or the existing database, if it is already created.\n* `docker logs` shows all the logs prefixed with log source (in the style of syslog).\n* Uses `trap` to handle signals and shutdown gracefully.\n* Data and logs are stored in `/data` so that `-v /data` could be used.\n* Total memory used by Oracle instance (MEMORY_TARGET) is set depending on `--shm-size` parameter.\n* rlwrap can be installed by running `bash /tmp/install/install_rlwrap.sh` (+ 50 MB on disk).\n\n\n## Build\nOptional: if you are using [Vagrant](https://www.vagrantup.com/), you can use this [Vagrantfile](Vagrantfile) for your build environment.\n\n1.  download `linuxamd64_12102_database_1of2.zip` and `linuxamd64_12102_database_2of2.zip` from [oracle.com](http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-2240591.html) **and extract the archives to current directory**.\n2. Execute the following lines in bash and wait ~15 minutes:\n```shell\ngit clone https://github.com/bofm/docker-oracle12c.git\ncd docker-oracle12c\nmake all\n```\n\n## Usage\n*Note: In the following examples `oracle_database` is the name of the container.*\n\n* Create or run database and listener\n  * Daemon mode\n\n    ```bash\n    # Create and start\n    docker run -d --shm-size 1GB --name oracle_database -p 1521:1521 -v /data bofm/oracle12c\n    # Stop\n    docker stop -t 120 oracle_database\n    # Start again\n    docker start oracle_database\n    ```\n    **Important:** Always stop with `-t`, otherwise Docker will kill the database instance, if it doesn't shut down in 10 seconds.\n  * Foreground mode\n\n    ```bash\n    # Start\n    docker run -it --shm-size 1GB --name oracle_database -p 1521:1521 -v /data bofm/oracle12c\n    # `ctrl+c` (SIGINT) to stop\n    ```\n\n* Create a gzipped tar archive suitable for `docker load` (an archive of the image with a created database and without volumes)\n\n  It is recommended to use large (\u003e=20GB, the default is 10GB) Docker base volume size, for which Vagrant with [Vagrantfile](Vagrantfile) can be used.\n\n  ```bash\n  # Build everything and save the created image to a file.\n  #   This will echo something like this:\n  #     Image saved to: /some/path/docker_img_oracle_database_created_YYYY-MM-DD.tgz\n  make all docker-save\n\n  # The saved image can be loaded from the file\n  # The image will be loaded with tag bofm/oracle12c:created\n  docker load \u003c docker_img_oracle_database_created_YYYY-MM-DD.tgz\n\n  # Run the image in the new container\n  # Daemon\n  docker run -d --shm-size 1GB --name oracle_database -p 1521:1521 bofm/oracle12c:created\n  # Foreground\n  docker run -it --shm-size 1GB --name oracle_database -p 1521:1521 bofm/oracle12c:created\n  ```\n\n* Logs\n\n  ```bash\n  # Check all the logs in one place\n  docker logs oracle_database\n\n  # Check alert log\n  docker logs oracle_database | grep alertlog:\n\n  # Check listener log\n  docker logs oracle_database | grep listener:\n  ```\n\n* SQL*Plus, RMAN or any other program\n\n  ```bash\n  # Bash\n  # as root\n  docker exec -it -u root oracle_database bash\n  # as oracle\n  docker exec -it oracle_database bash\n\n  # Run sqlplus in the running container\n  docker exec -it oracle_database sqlplus / as sysdba\n\n  # Run rman in the running container\n  docker exec -it oracle_database rman target /\n\n  # Run sqlplus in a separate container and\n  # connect to the database in the linked container\n  docker run -it --rm --link oracle_database:oradb bofm/oracle12c sqlplus sys/sys@oradb/ORCL as sysdba\n  ```\n\n* Start listener only (not sure if anybody needs it :) )\n\n  ```bash\n  docker run -d --name listener -p 1521:1521 bofm/oracle12c listener\n  # Or link it to the running container\n  docker run -d --name listener -p 1521:1521 --link \u003cdatabase_container\u003e bofm/oracle12c listener\n  ```\n\n### Compatibility\n* Tested on Docker 1.12\n\n### Limitations and Bugs\n* `--shm-size` option is required to mount /dev/shm to use Oracle's automatic memory management.\n* Oracle Database doesn't work with Docker ZFS storage driver by default. Check [this issue](https://github.com/bofm/docker-oracle12c/issues/10) for the workaround.\n* Database options and sample schemas installation through DBCA is a mystery. In this repo dbca is run with `-sampleSchema true` and [db_template.dbt](step2/db_template.dbt) contains this line `\u003coption name=\"SAMPLE_SCHEMA\" value=\"true\"/\u003e`, but nothing happens, the database is always created without sample schemas. Well, that's Oracle Database after 30+ years of development.\n\n### License\n* This repo - [MIT License](LICENSE).\n* Oracle Database software - see [Database Licensing Information](http://docs.oracle.com/database/121/DBLIC/toc.htm).\n\n### TODO\n* create new databases faster\n* use spfile?\n* EM DBconsole\n* Archivelog mode option?\n* syslog-ng or rsyslog, maybe?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbofm%2Fdocker-oracle12c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbofm%2Fdocker-oracle12c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbofm%2Fdocker-oracle12c/lists"}