oracle-databasedockerimpdp

How to download and import a dump directly into your oracle Docker image?


I am quite new to docker technology and still learning and reading through the docs. I have an oracle base image which i would like to use as a parent image to build my own image and then pushing it towards custom docker registry/repository.

The base image already provides a full setup of oracle db. But as next steps, i would like

I tried to follow https://github.com/mpern/oracle-docker, but here you always need to store dump file locally and point it as volume.

Is it possible if i can use curl command to download and directly store in oracle docker container workspace? Afterwards importing it from there


Solution

  • You can run an interactive bash session inside your container to check if curl is installed, and if it is not installed then you need to install Curl. Using an interactive bash session, you can then download your dump file.

    The ports you require will also need to be be published, if the container is connecting outside of Docker and the host machine, you can use docker run with the -p parameter.

    An example is below,

    docker run -p 80:80 -it (Your image) /bin/bash

    More information on this regarding the docker run command, and Dockerfiles

    https://docs.docker.com/engine/reference/commandline/run/ https://docs.docker.com/engine/reference/builder/