Import oracle dump file on docker in linux

Now I have aldready of Oracle version 11 g on my docker in Centos 7. Now I want to import Oracle dump file of 10g into my docker. Can anyone help me to solve that problem? Thank you in my advance.

P/s: I am a beginner with docker. so if you can describe detail step by step, I am happy with that.

I assume you are aquainted with how to import an oracle db dump into a oracle database.

The process for a containerized oracle db is not that different, the container specific differences are:

  • how to make the dump file available in the container?
    • use volume binds for this: docker run -v /host/path/where/the/dump/is:/container/path
  • how to execute the required commands inside the container?
    • use docker exec -ti {container name or id} sh to get a shell inside the container
    • use the command you would normaly use to restore the database dump into the database

I won’t be able to offer more guidance than that.

docker run -v /host/path/where/the/dump/is:/container/path

That may be my issue. I check capacity of my dump file is 70 Gb. but now my root directory has just only 54 Gb remain. So I can not cp my dump file into my container. So how we can run dump file outside container?

You just quoted the solution suggested by @meyay
You don’t copy, you mount.

Although this is just a partial solution, since if Docker’s data root folder is not on a bigger disk, you won’t be able to import 70 GB of data on disk having only 54 GB free space. You can move that 70 GB out to a pendrive or external HDD and mount that into the container.

Thank you for your mention about the quote. I will try that method you give me.