oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.52k stars 5.42k forks source link

Too heavy, too slow... #1678

Closed CamilYed closed 3 years ago

CamilYed commented 4 years ago

Can You explain me why Oracle docker image starts very slow?

I had to create my own image, beacuse i wanted ommit a database creation step. You can check my repo: https://github.com/KamilJedrzejuk/oracle18c-xe

I can't use original image with Testcontainers lib in my integration test. if on the other hand we look at the PostgreSQL is very fasts and light in tests.

Please check nice example https://kiview.github.io/testcontainers-grails-workshop/ postgresql is less than 300mb...

For me This is ridiculous:

IMPORTANT: The resulting images will be an image with the Oracle binaries installed. On first startup of the container a new database will be created, the following lines highlight when the database is ready to be used:

######################### DATABASE IS READY TO USE! #########################

CamilYed commented 4 years ago

Is anyone who can help? @gvenzl ?

CamilYed commented 3 years ago

So I guess problem is solved?

Djelibeybi commented 3 years ago

Sorry, I was closing out stale issues and must have closed this one by mistake.

Djelibeybi commented 3 years ago

Have you tried using the Prebuild DB example: https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance/samples/prebuiltdb

As for size, that's not something we can do much about. Oracle Database is pretty big. You can try applying the submitted code to create -slim variants from https://github.com/oracle/docker-images/pull/1666 and see if that helps.

Djelibeybi commented 3 years ago

[Oracle XE licensed changed. Post is no longer accurage. Edited.]

CamilYed commented 3 years ago

Ok I,ve removed.

Djelibeybi commented 3 years ago

Thanks. Let us know if the Prebuilt DB and/or the -slim variants work for your use case too.

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

lukaseder commented 3 years ago

I'm coming here from a Twitter discussion: https://twitter.com/gmarziou/status/1361700331483234307

I understand that these things are difficult to move forward at Oracle. I've been in touch with numerous people at Oracle about this topic, including e.g. @gvenzl. I just want to stress that pretty much all of Oracle's competition, including IBM with both Db2 and the arcane Informix, or Microsoft with SQL Server (they even had to adapt everything to work on Linux, first!!), and obviously PostgreSQL, just to name a few (a few more: CockroachDB, Exasol, Firebird, HANA, Ignite, MariaDB, MemSQL (now SingleStore), MySQL) make working with Docker:

To be fair, an example that is harder to work with: Sybase ASE. Yes, given Larry's only ever tweet, Oracle is still doing better than SAP. Oh wait. No. HANA is also by SAP. 😁

@gvenzl recently asked me to join a product meeting at Oracle where Oracle would reach out to the community to learn what Oracle can improve with respect to developer friendliness, especially in a context of losing to the competition.

This is one of the top issues that comes to my mind from a developer perspective. Yes, things were a lot worse in the past in pre-docker days, and we're also discussing this publicly on github instead of via a closed MOS SR. But things could be much better by now with regards to this docker integration. This issue here could be one of Oracle's top dev friendliness priorities. Alas, it was auto-closed twice.

Look at how I install SQL Server 2019:

docker pull mcr.microsoft.com/mssql/server:2019-latest
docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=Test1234 -e MSSQL_PID=Express -p 1433:1433 --name SQLSERVER2019 -d mcr.microsoft.com/mssql/server:2019-latest

And it runs fast. Isn't that also what everyone working at Oracle internally on various products, like e.g. SQL Developer, APEX, SQL*Plus, Enterprise Manager, ojdbc, etc etc. would want for themselves as well?

gmarziou commented 3 years ago

My own experience.

My pre-built (empty) Oracle 19 Standard image is 8 GB large, and 13 GB large once schema is instantiated.

To share it with my team, I needed to use an internal private docker registry, after several failed attempts to upload it by docker push over a bad network because of forced remote working in COVID-19 times, I ended up splitting it up in smaller parts using tar, uploading them using sftp and then pushing it locally. Fortunately, pulling worked better. Although, I had to request increasing disk space on our registry to support multiple versions. I can't imagine fully automating this process in Jenkins.

Startup time is 40 seconds while Postgresql starts up in few seconds. This impacts the way we write unit tests.

We use docker only for development and testing. If project would have been a green field one, this bad developer experience would have lead us to choose Postgresql but this is a 10 years-old project so....

Djelibeybi commented 3 years ago

Please continue this discussion here: https://github.com/oracle/docker-images/issues/1862

lukaseder commented 3 years ago

Thanks, @Djelibeybi. @gmarziou: Best copy your comment to the new issue as well :)