Hi!
My requirement is to build an Oracle Database 12c Docker image. But my problem is that my machine lacks the Internet. What exact packages (or any additional settings) do I have to install in order to make the image created?
Hi
isn't it an option to create the image on a system with an internet connection and then copy the docker image to the target system via docker save / docker load?
On the build system
docker save oracle/database:12.2.0-ee |gzip -c >oracle_database_12.2.0-ee.tar.gz
On the target system
gunzip -c oracle_database_12.2.0-ee.tar.gz | docker load
Cheers
Stefan
@oehrlis, thanks for a suggestion but unfortunately it's impossible to bring such big files (AFAIK the image would be approx 3 GB) inside our network but I can download some packages DB needs to be successfully created.
@alesana-san to build the image you will require a couple of rpm's to update / configure the base OEL image. This you could workaround by using a local yum repo on your target server. Beside this you will always have to provide the oracle binaries. The file _linuxx64_12201_database.zip_ is 3.2GB. By using my method above you combine _docker save_ with gzip. The tar/gzip of you 12.2.0 docker image will be less than 3GB.
oracle@tera:/data/docker/images/ [ic12201] ls -alh oracle_database_12.2.0.1-ee.tar.gz
-rw-rw-r-- 1 oracle wheel 2.6G Apr 29 22:01 oracle_database_12.2.0.1-ee.tar.gz
If this is still to large, you may split the file on your build server using _split_
@oehrlis, thanks for a suggestion but unfortunately it's impossible to bring such big files (AFAIK the image would be approx 3 GB) inside our network but I can download some packages DB needs to be successfully created.
As @oehrlis said, the packages need to build the image are much larger than the image itself. You would need the oraclelinux:7-slim base image along with a mirror of quite a lot of packages from yum.oracle.com in order to prepare the image for the database.
The thing is that we have an image inside of our network so it's not a problem. I found out that we have some repos and luckily I found out that all packages used for image building exist. So my next question is: Is there any way to change default yum repo in an image to prevent it from going to oracle.com one? In my case I added some lines to oracle-linux Dockerfile to set our local repo and then I built my DB image.
You would have to modify your Dockerfile to disable the default repos and enable your own repos. The oraclelinux:7-slim image includes yum-config-manager which can be used to do this.
@Djelibeybi yes, I changed oraclelinux image by adding addrepo command there. I guess I can't do this without changing Dockerfile and rebuilding an image, right?
Correct.
Thanks for explanation!