Hi, I successfully built the docker image for OracleDatabase 19.3 se2.
The issue is when I start it. I've tried this on 2 different machines (on a Mac and one a Linux system) and in both cases it takes more than 35 minutes to start!
I started it with docker run -p 1521:1521 -p 5500:5500 -e ORACLE_SID=xwiki -e ORACLE_PDB=xwikipdb -e ORACLE_PWD=xwiki oracle/database:19.3.0-se2 (note: I also tried by mapping a local directory for the DB files with the same slow result).
The part that is extremely slow is this part:
...
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
...
We used to use a Oracle 11g docker image execute test XWiki (https://xwiki.org) on it to validate that we support the Oracle DB and it was working ok (about 2mn to start it). We'd like to validate against a more recent version, which is why I've been trying using version 19.3 for the past 2 days.
However with a startup time of 35+ minutes it's impossible for us to use it for our tests. We start and stop the container hundreds of times across all our test suite (hundreds if not thousands of tests across different modules).
So some questions:
1) Is that startup expected? Is that what everyone is experiencing? I should note that the machines on which I tried it are quite large and beefy machines with lots of CPU and RAM (and I didn't put any resource limits).
2) Is there something that can be done to speed it up so that it starts in about 2-3 minutes?
Thanks a lot
-Vincent
XWiki open source commmitter
@vmassol I posted a blog post (instruction), why it is taking so much time and how it can be optimized here: https://medium.com/@ggajos/drop-db-startup-time-from-45-to-3-minutes-in-dockerized-oracle-19-3-0-552068593deb
@ggajos Thanks a lot, very useful. I actually used some Oracle 19.3 images that were supposed to do this but they were still quite slow to start if I remember correctly: https://hub.docker.com/r/quillbuilduser/oracle-18-xe
3 minutes is still very long to start to DB (we have hundreds if not thousands of tests in different modules) so that a lot of hours just to start/stop the Oracle DB... ;) But not much we can do about this except drop testing on Oracle or test less often on it.
The main issue with your solution is that we need to store the new image somewhere so that all devs can get it, including our CI. So this means having to setup a Docker Registry, which we've avoided so far (lots of hassle and maintenance required). We're trying to use only dockerhub.
Thanks!
Chceck this walk around https://github.com/KamilJedrzejuk/oracle18.4.0xe-docker
Chceck this walk around https://github.com/KamilJedrzejuk/oracle18.4.0xe-docker
Why not sign the Oracle Contributor Agreement and submit that as an additional Dockerfile for this repo?
@vmassol
@mark-au
@Djelibeybi this repo had some issues.
You can check this https://github.com/KamilJedrzejuk/oracle18c-xe
@gvenzl Has this issue been finally fixed?
This issue has not been fixed and probably stems from how oracle approaches software as a whole.
In general when developing a docker application you start from the ground up making sure it is quick to start so that it is available for other services(especially if you can store database data elsewhere)
Oracle's approach is to have an existing slow product and shove it into a container.
@KamilJedrzejuk thank you so much will give this a shot. Not sure why this issue is closed it is one of the biggest issues in this repo.
Thanks for the clarification
Most helpful comment
@vmassol I posted a blog post (instruction), why it is taking so much time and how it can be optimized here: https://medium.com/@ggajos/drop-db-startup-time-from-45-to-3-minutes-in-dockerized-oracle-19-3-0-552068593deb