After a long absence I feel obliged to bring this project to an end. Therefore I start my works with the most simple Dockerfile
Click on the picture to enlarge |
Click to enlarge |
And there is a docker client, which you simply call typing "docker --help" e.g. for getting help. Try it out. For the details see the extensive documentation Docker userguide
The client command docker build sends the instructions of the Dockerfile to the docker daemon. The most simple build command is what you see here: docker build -t oraclelinux:demo .
NOTE the last argument: it is a dot, the symbol for the actual working directory. I will explain that deeper in the next posts.
The result of a successfull build process is a new image which contains the existing image plus the changes made during the build. It seems a bit magic, but simply reflects, that before the build I have downloaded an official docker image called oraclelinux:7.1 from an official docker repository, where 7.1 after the colon is called a tag, which refers to the "release", and afterwards I have another image called oraclelinux:demo. Use the command docker images to see them.
Click to enlarge |
So we rely on the image oraclelinux:7.1 to come along with the tedious preconditions required for Oracle databases. See my post about required packages . You can control - inside oraclelinux:7.1 of course - the installed packages with the Linux utility rpm like that e.g.
[root@97607feb304d myscripts]# rpm -qa | grep libgcc
libgcc-4.8.3-9.el7.x86_64
There is one thing we must control before the installation of Oracle database software: we are bound to work as the user oracle, hence we need the unix command su - oracle (substitute user identity in this user's environment). We start an new container with the command docker run [options][arguments]
Click to enlarge |
The option -it starts an interactive Pseudo-Terminal.
The option --rm removes the new container at the session end.
The argument oraclelinux:demo runs the just newly created image in the container.
The argument /bin/bash runs a bash process as the user root.
We convince ourselves that the unzip - tool is installed, that the user oracle exists and is member of the correct groups and that we really are able to run su - oracle. Everything seems fine.
In future sessions we will just run a container with the last argument like that:
Click to enlarge |
1 comment:
This Dockerfile is too simple and I am convinced, that oraclelinux:7.1 does not come along with all packages required for a full installation of Oracle 12c Enterprise Edition.
The pictures serve to show the result of an operation, but when you present an operation itself, I want to copy & paste your text. Please publish scripts etc. as plain text
Post a Comment