Comments (3)
Yes, this helps a lot. Thank you for enumerating and describing the different options. This was very useful and insightful.
I like the volume-based approach and the pluggable database-approach and will experiment with this.
from oci-oracle-xe.
Hi @alf-mindshift,
Thank you very much, I'm glad you like them!
You have a couple of options here, depending on your scenario.
The two options that you have laid out above are definitely valid but I would recommend option No. 2 when considering them, as that one can be easily automated and added to a common (container) toolchain.
An important question is whether you would like to have a customized database as part of the image, or not.
A third approach could be to, for example, create a database with the steps outlined above in No. 1, but instead of doing a docker commit
, you preserve the customized database in a volume once. The container script is smart enough to check whether there already is an existing database and if so, it will just start that database up. So you could point your container to a volume that already has such a customized database in it, and it will just start that database up for you. The downside, however, is that you will have to have that volume obviously readily available wherever the container will run and clone it each time you want to start another container. Depending on your environment, as I believe some orchestration technologies have such a concept of giving containers cloned images, this may not be much of a downside.
A fourth approach that will give you the fastest startup time and benefit of encapsulation would be to combine No. 2 above and the trick about the volume, i.e.:
- create the database with everything setup and the DB files pointing to a volume
- build a new image by copying the database files from that volume into the right place.
- use that new image
The downside of that approach is that your image on the host will have gotten bigger but when you run that image it will just start up your database, giving you the fastest possible startup time.
As to a fifth approach, Oracle 18c XE also comes with a new technology called "pluggable databases" that provides many flexibilities and possibilities when it comes to creating, cloning and relocating databases.
A more database-centric approach could be to create such a pluggable database that comes with all the starter data set included and unplug it as a "gold image". Then on database startup time you just plug in the PDB by providing an additional volume to that container and use the CREATE PLUGGABLE DATABASE FROM ...
command in a SQL
script in /container-entrypoint-initdb.d
. The approach will be similar to approach No. 3 just that it leverages database built-in capabilities and provide you perhaps with better reusability.
Hope this helps!
from oci-oracle-xe.
Great, please do let me know how it goes! :)
from oci-oracle-xe.
Related Issues (20)
- The last commit broke the Github Actions HOT 3
- ORA 28040 No matching Authentication Protocol HOT 1
- Unable to start container HOT 1
- ORA-00443: background process "PMON" did not start HOT 1
- Permission denied on Github Workflow HOT 4
- ORA-43853: SECUREFILE LOBs (Large Objects) cannot be used in non-automatic segment space management tablespace "SYSTEM" HOT 3
- Missing double-quotes for APP_USER HOT 3
- Provide `FREE` SID (together with current `XE`) HOT 7
- Multi-schema DB Access HOT 3
- docker image 21-slim-faststart has an outdated healthcheck.sh HOT 5
- Trying to run gvenzl/Oracle-XE image From a Synology 920 DSM Container HOT 3
- error after restarting container
- Apple silicon support HOT 3
- Mac M2 Oracle-XE, both latest and 18.4.0, does not start, ORA-03113: end-of-file on communication channel HOT 4
- Running Oracle as sibling / child container in podman - Oracle database startup failing HOT 3
- Do you have the image 19c-slim HOT 2
- can i change oracle xe 11g NLS_LANG to other HOT 1
- tar with extended attributes issue HOT 7
- Hope add 12c and 19c HOT 1
- Starting docker image with different owner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-oracle-xe.