How to run Oracle Databases in Docker Containers?

Running any database in a container is a high risk. Databases, and especially Oracle, give you their best performance if they can access the disks and memory directly, without any intermediary layer like Docker. You can find a lot of articles around the Interwebz on the matter.

The main argument is if you shut down the Docker instance during a critical write operation, your database can get corrupted. If you say “then I will make sure I don’t do that”,

  1. you can never be absolutely sure,
  2. Docker can crash, too.

If, despite all the above, you still want to run a database in Docker, all you have to do is to create a Dockerfile with an OS layer supported by the DB (Red Hat/CentOS is a good choice for Oracle), and install the DBA on top of it. It’s a good exercise, but I’m sure someone did it before.

or use the image oracle officially provides ?

1 Like