This demo shows how to run midPoint container with externally provided repository.
The image can be found in the Evolveum/midpoint-docker GitHub project.
We will assume that the repository is Oracle-based, hosted at 192.168.56.101. We have chosen Oracle mainly because it requires adding custom drivers to midPoint.
First of all we have to copy Oracle driver to appropriate place. Custom drivers reside in
lib subdirectory of midPoint home directory. The home directory is available as a Docker volume
extrepo_midpoint_home (in this particular composition). After downloading the Oracle driver you can copy it e.g. using the following commands:
These commands assume the volume
extrepo_midpoint_home does not exist yet. If it exists, you can skip the first two commands.
Password used to connect to the database is stored in
configs-and-secrets/midpoint/application/database_password.txt file. So, before starting midPoint, we have to make sure it's correct.
In our case the user name is
system and the password is
oracle, so let's execute this command:
Finally, let us start midPoint. We have to provide all the necessary information needed for repository connection:
After successful start of midPoint you can login and check that the database is really an Oracle one.
demo/extrepo composition contains a single container:
|This is the standard container providing midPoint functionality. It contains standalone Tomcat running midPoint application.|
The containers publish the following TCP ports. (Port mapped to localhost denotes the mapping of container port to the host port where it can be reached from the outside.)
|Container||Port number||Port mapped to localhost||Description|
|8080||8080||HTTP port to be used to connect to midPoint application|
The following volumes are created to persist data and other relevant files.
Used by container
|The midPoint home directory. Contains schema extensions, logs, custom libraries, custom ConnId connectors, and so on.|
Configuring the composition
The following configuration properties are supported. Please refer to the main documentation page for their explanation.
You can tailor these to your needs.
The following Docker secrets are used:
You can modify or replace these files as needed.
Outdated schema detection and upgrade
Here we will demonstrate outdated schema detection and upgrade functionality.
First let us delete any midPoint-specific data from our Oracle database. Then we manually install there midPoint schema from version 3.8, e.g. by applying this script: https://github.com/Evolveum/midpoint/blob/v3.8/config/sql/_all/oracle-3.8-all.sql.
Then let us start the container as above:
Unfortunately, midPoint refuses to start. There's something like this on the console (not quite at the end, because there's a large exception with tons of stack trace afterwards):
(The URL mentioned will be functional after 3.9 is released.)
We can now upgrade the database manually.
Or we can try the automatic upgrade process. (Note: better do not do this on a production system!)
We need to do two things:
- Because before midPoint 3.9 there is no explicit information about the schema version in the repository, we have to tell midPoint we have 3.8. Otherwise it would not know. This is done by setting
- We tell midPoint to automatically upgrade the schema. This is done by setting
Then we see this in the console (among other startup messages):
and midPoint starts successfully.