AndroidMania 2015
AndroidMania 2015

Reputation: 581

Docker oracle database fails when starting after commiting

guys.

I am just running into problems; I am setting up a Docker environment, with an Oracle DataBase. I am running the oracledb 12c in this way:

docker run -d -p 1521:1521 --name my-db sath89/oracle-12c

All goes well so far, if I docker logs the new container goes amazing, any errors.

Then, I just exported a database from another server, and I import it to my new db container. Everything goes cool, I can import it without any errors and my environment successfully starts up.

The problem comes when I try to commit the db container which I previously created, I do this:

docker commit my-db my-committed-db

The commit is successful, and I get my new image named my-committed-db, then, I of course deleted all my old containers.

But when I run the image I created in the previous step, in this way:

docker run -d -p 1521:1521 --name my-db my-committed-db

the container starts up, but when I look at docker logs, it just exits 1. this is what i get:

docker logs -f my-db

    ls: cannot access /u01/app/oracle/oradata: No such file or directory
    Database not initialized. Initializing database.
    Starting tnslsnr
    Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/xe.log" for further details.

I can't take a look at the log file because the container is stopped.

Any ideas of what I am doing wrong? Am I skipping something?

Thanks.

Upvotes: 2

Views: 1353

Answers (1)

AndroidMania 2015
AndroidMania 2015

Reputation: 581

The solution was to edit the original Dockerfile for sath89/oracle-12c and delete the VOLUMES layer. Then, build a new image, do the import process there and then use that one to commit.

Upvotes: 1

Related Questions