Home / Creating and Running InterSystems IRIS Docker Containers / The iris-main Program

InterSystems: The power behind what matters   

The iris-main Program
There are several requirements an application must satisfy in order to run in a Docker container. The iris-main program was developed by InterSystems to enable InterSystems IRIS and its other products to meet these requirements.
The main process started by the docker run command, called the entrypoint, is required to block (that is, wait) until its work is complete. In the case of a long-running entrypoint application, this process should block until it's been intentionally shut down.
InterSystems IRIS is typically started using the iris start command, which spawns a number of InterSystems IRIS processes and returns control to the command line. Because it does not run as a blocking process, iris is unsuitable for use as the Docker entrypoint application.
The iris-main program solves this problem by starting InterSystems IRIS and then continuing to run as the blocking entrypoint application. The program also gracefully shuts down InterSystems IRIS when the container is stopped, and has a number of useful options. To use it, add the iris-main binary to a Dockerfile and specify it as the entrypoint application, for example:
ADD host_path/iris-main /iris-main
ENTRYPOINT ["/iris-main"]
Docker imposes these additional requirements on the entrypoint application:
In addition to addressing the issues discussed in the foregoing, iris-main provides a number of options to help tailor the behavior of InterSystems IRIS within a container. The options provided by iris-main are shown in the list that follows; examples of their use are provided in Running InterSystems IRIS Containers.
Options for iris-main appear after the image name in a docker run command, while the Docker options appear before it. As with the docker command, the options have a long form in which two hyphens are used and a short form using only one.
The iris-main program is configured to append its logging output to previous output, so that, when the InterSystems IRIS container is restarted, some record of how and why it shut down remains available.
Option Description Default
-i instance,
Sets the name of the InterSystems IRIS instance to start or stop. (The instance in a container distributed by InterSystems is always named IRIS. IRIS
-d true|false,
Stops InterSystems IRIS (using iris stop) on container shutdown true
-u true|false,
Starts InterSystems IRIS (using iris start) on container startup true
-s true|false,
Starts InterSystems IRIS in single-user access mode false
-k key_file,
Copies the specified InterSystems IRIS license key (see License Keys for InterSystems IRIS Containers) to the mgr/ subdirectory of the install directory. none
-L license_config,
Configures the license server and specifies licenses to be served. For an explanation of this option’s arguments, see License Keys for InterSystems IRIS Containers; for examples of its use, see Running InterSystems IRIS Containers. none
-l log_file,
Specifies a log file to redirect to standard output for monitoring using the docker logs command. none
-b command,
Sets the executable to run (such as a shell script) before starting InterSystems IRIS none
-a command,
Sets the executable to run after starting InterSystems IRIS none
-e command,
Sets the executable to run after stopping InterSystems IRIS none
Execute a custom shell command before any other arguments are processed
Execute a custom shell command after any other arguments are processed
-p password_file,
Change the default password for the predefined InterSystems IRIS accounts to the string contained in the file, and then delete the file.
This option is primarily for use in scripts and other automation; when using it, bear in mind the risks of committing the password to a file for any significant length of time. The first manual login to InterSystems IRIS after the container starts includes a mandatory default password change; for more information, see Changing the Default InterSystems IRIS Password.
--version Prints the iris-main version N/A
Displays usage information and exits N/A

Send us comments on this page
View this article as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-06-14 04:01:01