2

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.

3
  • asciinema.org/a/45878 i can see similar output in this video :/ but if the continner is stopped, it is indeed a problem. my approach would be inspecting the image, look at its entrypoint. When i commit to a new image i add a new entrypoint that does nothing, but does not die either. and try to run the commands from the initial entrypoint by hand. Commented Jul 1, 2016 at 10:38
  • Yes, that video shows exactly de same output. But only this "Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/xe.log" for further details" Because if you see, my output doesn't show any percentage as in the video. Mine just explodes :( But I just could find the solution :D; Let me post it below. Commented Jul 7, 2016 at 22:13
  • @asciinema.org/a/45878 The solution was to edit the original Dockerfile, and delete the VOLUMES layer. Then, build a new image, and use that one :D Thanks. Commented Jan 16, 2017 at 20:36

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.