Once you have made the InterSystems IRIS image available on your local machine and have identified the external storage location and placed your license key on it, you are ready to use the docker run command to create and start a container. The docker run command actually combines three separate Docker commands, as follows:
docker pull — Downloads an image if it is not already present locally.
docker create — Creates a container from the image.
docker start — Starts the container.
Each of these commands is useful separately, for various purposes in different contexts. For more information, see Docker run reference
in the Docker documentation.
A sample docker run
command follows; all of its options are explained in the accompanying text. Note that options to the docker run
command appear on the command line before the image specification, while options to the InterSystems iris-main
program (see InterSystems IRIS in Docker Containers
) come after.
docker run --name iris \
--publish 52773:52773 \
--volume /nethome/pmartinez/iris_external:/external \
--key /external/iris.key \
Specifies the name of the container, which you can use to refer to the container in other Docker commands, for example docker stop container_name when you want to stop the container.
Indicate that an init process should be used as PID 1 within the container, ensuring that the usual responsibilities of an init system are performed inside the container.
Runs the container in the background (and displays the container’s unique ID).
Publishes a port within the container to a port on the host so that entities outside the container (on the host or on other machines) can contact a program in the container. For example, an InterSystems IRIS instance’s Management Portal is reached through the instance’s web server port (52773 by default). If this port inside the container is published to a port on the host, the instance’s Management Portal can be loaded into a browser using the host’s port.
Mounts an external storage location accessible by the container as a storage volume inside the container. For information about which storage locations can be mounted in this way and Docker configuration that may be required, see Use Volumes
in the Docker documentation.
InterSystems does not support mounting NFS locations as external volumes in InterSystems IRIS containers.
Specifies the image to be pulled and used to create a container (see Download the InterSystems IRIS Docker Image
). Use the docker images
command to list available images and make sure you are specifying the right one. The instructions here assume the image is iris:stable
An iris-main option that identifies the InterSystems IRIS license key to be installed in the instance in the container; this location must be on a mounted volume.
Use the preceding sample and explanations to construct your own docker run command and execute it on the command line. When the command has completed, use the docker ps command to see your container in the list with a status of Up.
$ docker run --name iris --init --detach --publish 52773:52773
acme/iris:2018.1.0.583 --key /externaliris.key
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
426d4a511d67 acme/iris:stable "/iris-main --key ..." 5 seconds ago Up 3 seconds
As shown in the example, after creating the container, Docker outputs the UUID long identifier; the first 12 characters make up the UUID short identifier, which is used to identify the container in other output, for example from the docker ps command.
Content Date/Time: 2019-09-19 06:44:29