Article
· Feb 24, 2023 2m read

InterSystems IRIS in Containers

InterSystems has also released IRIS as containerized deployments. This post is to demonstrate how InterSystems IRIS and applications those rely on IRIS a backend can be packaged into an image and be run in other machines in containers and how simple it is to do that.

A container runs image/s which have all the necessary executables, binary code, libraries, and configuration files. And the images can be moved from one machine to another, and  an images repository like Docker Hub can simplify that process.

I have used an application from Open Exchange for this demo.

Demo video: https://www.loom.com/share/93f9a760b5f54c0a8811b7a212387b9d

The image for IRIS Data Platform Community Edition can be found at the InterSystems Container Registry: https://containers.intersystems.com/contents

In order to use a containerized instance of IRIS in a host machine, it shall be pulled during runtime.

For that, the Dockerfile needs to have following commands like shown below:

Dockerfile:

Dockerfile

ARG IMAGE=intersystemsdc/iris-community:preview

FROM $IMAGE

RUN iris start IRIS \

 && iris merge IRIS /tmp/merge.cpf \

 && iris stop IRIS quietly

These are the base commands that make a Dockerfile  written to build an image which has instructions for containerized IRIS.

The commands to also run installation of other dependencies required for the application that is running alongside the containerized instance of IRIS can be added.

Given are the Docker commands that tag and push an image that carries IRIS instance into Docker Hub, and subsequently pull and run that image in another host machine.

 

Commands

docker build -t image_name filepath

docker tag image_name dockerhub_username/repository_name:tag_name

docker push dockerhub_username/repository_name:tag_name

     

Commands

docker pull dockerhub_username/repository_name:tag_name

docker run --name test -p host_8080:52773 padhikar/irisincontainer:main

Application used in demo: https://openexchange.intersystems.com/package/iris-geo-map

Creating InterSystems IRIS images: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=ADOCK#ADOCK_iris_creating

Discussion (2)2
Log in or sign up to continue

Just for clarification, the lines starting with `ARG IMAGE = ` replace each other. Only the last one is actually used. I'm not sure why the others  are left in there but I think its so users will know what worked before. So you can simplify the Dockerfile to:

ARG IMAGE=intersystemsdc/iris-community:preview 
FROM $IMAGE 
RUN iris start IRIS
 \ && iris merge IRIS /tmp/merge.cpf
 \ && iris stop IRIS quietly