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.45k stars 5.4k forks source link

Reuse Existing Database Files When Re-creating an Oracle 19c Container #2771

Closed yuyangyumi closed 4 months ago

yuyangyumi commented 4 months ago

When I have already built an Oracle 19c image and created a container with the data directory mounted into it. Later, I removed the container but kept the database files in the data directory. Now, I would like to recreate a new Oracle 19c container, mount it to the previous data directory, and ensure that the new container can use the existing database files instead of initializing the database again. I am seeking to know if there is a way to achieve this.

yunus-qureshi commented 4 months ago

You just have to mount the same data directory on to the new container. Is that not working?

yuyangyumi commented 4 months ago

Yes, when I need to reuse existing Oracle 19c database files instead of creating them again, I want to mount the directory containing these files to a new container.

You just have to mount the same data directory on to the new container. Is that not working?

yunus-qureshi commented 4 months ago

Okay I am not understanding your issue here. Can you explain what is problem that you are seeing?

yuyangyumi commented 4 months ago

Thank you very much for your help, I appreciate it. I have realized that it was my mistake. The initial initialization process was too slow, and I interrupted it midway, resulting in an incomplete database. Therefore, it will reinitialize the database.