Ken Earl · May 5, 2020

Iris\Cache in Docker : Cube Server list and global persistence

I have just started to experiment with Using IRIS in Docker.

My first objective was to be able to enable global persistence within a Docker container. Using the following command I have managed to achieve this:

docker run --detach --publish 52773:52773 --volume /data/dur:/dur --env ISC_DATA_DIRECTORY=/dur/iconfig --name iris21 store/intersystems/iris-community:2020.

Within this container, I have created a simple global:

for i=1:1:10 set ^tmp(i)=""

I then stopped and removed the container. On reloading and restarting the container the global has persisted.

However, I have just discovered that this global only persists whilst the computer is on, once the PC has rebooted the global does not now exist; does this mean that the database is only stored in memory. How do I change this to ensure  that the database is stored on disk for persistence?

The next step is to access the container via the Iris Cube for Management Portal and Studio, is this possible?
I have created the following connection:

but when looking for the created global in the Management Portal, I cannot see the global. Have I set this up correctly?

Many thanks.

0 233
Discussion (7)3
Log in or sign up to continue

you didn't tell us the Namespace. Assuming USER.
you have to take care that the Database for USER is part of your durable environment.
after restart of your container any thing not in the durable environment (e.g IRISTEMP) is gone

Thanks Robert,
How do I ensure that  the USER database is part of the durable environment? I am attempting this just locally on my pc (not using any external servers so I am expecting the DB to be stored locally), so do I have to add/change anything to the Docker Run command below?

docker run --detach --publish 52773:52773 --volume /data/dur:/dur --env ISC_DATA_DIRECTORY=/dur/iconfig --name iris22 store/intersystems/iris-community:2020.

Many thanks


I copied your Docker command and I observed user IRIS.DAT database file was under durable storage. I believe it is because of "--env ISC_DATA_DIRECTORY=/dur/iconfig". 

Best regards,



You running IRIS with an activated feature named as Durable %SYS, which means, some of your settings, should persist even when you restart and recreate containers. So, this may be a cause that your global persist after a recreate container. But does not says why it disappears after the restart of the host system. While we know almost nothing about your whole configuration, it's a bit difficult to discover what's going wrong.

For sure, you can connect with Studio, just should keep in mind few points:

  • The version of Studio should be the same or higher than version of server
  • Port used for connection should be superport which is 51773 on IRIS side. So, you just have to add more -p 51773:51773, where the first 51773, is the port on your host machine, while the second one is mostly constant.

You can also use VSCode for development with IRIS, in this case, should be used web port 52773, instead of 51773. 


Are you using Docker for Windows?  I don't recommend it if you have access to a Linux system or Linux VM.  There are many frustrating limitations with it.

You can try to start your container without the --detach flag to see more about what is happening at container startup.  If everything seems right, but you still have a problem, try reaching out to the WRC for help.


I am learning Iris and Docker in my free account with Amazon Web Services. I started a new EC2 instance and with Docker. I copied your Docker run command. Then I got into Iris Terminal with this command:

docker exec -it iris21 iris session IRIS

I was in USER namespace and I populated the global: 

USER>for i=1:1:10 set ^tmp(i)=""

I viewed the global in Management Portal:$ID2=tmp&$NAMESPACE=USER&$NAMESPACE=USER  

I halt out of Iris terminal and review storage. I find two IRIS.DAT for %SYS and user.

ubuntu@ip-172-31-45-10:/data/dur/iconfig/mgr$ ls -lt
total 194660
-rw-rw---- 1 51773 52773 104857600 May  6 02:53 IRIS.WIJ
-rw-r----- 1 51773 52773  94371840 May  6 02:50 IRIS.DAT
-rw-rw-r-- 1 51773 52773     38723 May  6 02:48 messages.log
-rwxrw-r-- 1 52773 52773        66 May  6 02:38 SystemMonitor.log
drwxrwxr-x 3 root  52773      4096 May  6 02:38 user
drwxrwxr-x 3 root  52773      4096 May  6 02:38 irisaudit
drwxrwxr-x 2 52773 52773      4096 May  6 02:38 Temp
-rw-rw---- 1 51773 52773       219 May  6 02:38 journal.log
drwxrwxr-x 2 51773 52773      4096 May  6 02:38 journal
drwxrwxr-x 3 52773 52773      4096 May  6 02:38 iristemp
drwxrwxr-x 3 root  52773      4096 May  6 02:38 irislocaldata
-rw-rw---- 1 51773 52773        35 May  6 02:38 iris.lck
-rw-rw---- 1 51773 52773        12 May  6 02:38 iris.ids
-rw-rw-rw- 1 51773 52773        58 May  6 02:38 startup.last
-rw-rw-rw- 1 51773 52773         2 May  6 02:38 iris.shid
-rw-rw-r-- 1 51773 52773         5 May  6 02:38 iris.use
drwxrwxr-x 2 root  52773      4096 May  6 02:38 stream
-rw-rw---- 1 51773 52773       938 Feb  7 16:00 irisodbc.ini
-rwxrwxrwx 1 51773 52773         0 Feb  7 16:00 ilock
ubuntu@ip-172-31-45-10:/data/dur/iconfig/mgr$ cd user
ubuntu@ip-172-31-45-10:/data/dur/iconfig/mgr/user$ ls -lt
total 11272
-rw-rw---- 1 51773 52773 11534336 May  6 02:50 IRIS.DAT
-rw-rw---- 1 51773 52773       35 May  6 02:38 iris.lck
drwxrwxr-x 2 51773 52773     4096 Feb  7 16:01 stream

I remove iris21 container from Docker by this command:

docker rm --force iris

The IRIS.DAT remained in user directory on my EC2 instance.

Management Portal would not work at this time.

I reboot EC2 instance from AWS console.

I login to EC2 using SSH and check IRIS.DAT files are still there.

I rerun the Docker run command to run iris21 again. I can return to Management Portal. It remembered the changed password when I log in. I can see the 10 enties in ^tmp global.

I believe you need to use port 51773 to connect Studio to Iris running in Docker container.