Robert Cemper · May 7, 2020 2m read

Docker - light weight durability

Working from home during these Corona-days I'm short on resources.
- no Linux machine available
- limited disk space
In addition, Docker Desktop (on Win10) blocked somehow scripts of Durable %SYS  as described here.
Investigating the case, I discovered that much more data were stored than I really needed.
So I designed my customized durability.
Similar as I did this some time back already for Caché containers.

Using the features of iris-main I add a pre-processing script to initialize my container with 

After termination, I save away what I feel to need for the next start.

And that's significantly less.
Agreed: I may miss some things and it's eventually slower in start/stop.  OK. But it is in my hands!

The scripts to run and also the saved data are all stored in the external directory that I need for the license already.
And those scripts are rather simple:

# post.copy
cp -uf /usr/irissys/iris.cpf /external/iris.cpf
cp -uf /usr/irissys/mgr/IRIS.DAT /external/mgr/IRIS.DAT
cp -uf /usr/irissys/mgr/messages.log /external/console.log


# pre.copy
cp -f /external/iris.cpf /usr/irissys/iris.cpf
cp -f /external/mgr/IRIS.DAT /usr/irissys/mgr/IRIS.DAT
rm -f /usr/irissys/mgr/messages.log

As there is nothing to set up at the first run I skip pre.copy as the first run ever.
For the rest, my run command in Docker looks like this  

docker run --name iris1 --init -it 
 -p 52773:52773 -p 51773:51773 
 --volume c:/external:/external 
  --key /external/key/iris.key 
  -e /external/post.copy 
  -b /external/pre.copy 

If I find out some  time later that I need more to be saved  / recoverd  (e.g. for CSP , ... ) it is easy to add it.
The key to success was to leave  IRISSYS database in the location it comes with the container. Its size of ~92MB (my case) is not relevant

0 0 122 0