InterSystems IRIS Data Platform 2019.2  /  First Look: InterSystems Products in Docker Containers  /  Try It! Create Your Own InterSystems IRIS-based Container

InterSystems: The power behind what matters   

Change the Instance and Commit the Container as a New Image
When you alter the program running inside a container, you can use the docker commit command to create a new image from the container. This new image is the same as the original image from which you created the container, but includes the alterations you made to the container. To see how this works, follow these steps:
  1. Open the Management Portal for the InterSystems IRIS instance in the container. The URL for an instance’s Management Portal incorporates both the host identifier and web server port number of the instance.
    For example, on the container host, with web server port 52773, the Management Portal URL would be http://localhost:52773/csp/sys/%25CSP.Portal.Home.zen.
    Log in using one of the predefined user accounts, for example _SYSTEM, and the default password SYS. For security reasons, you are immediately prompted to change the password; this happens after every first login (using either the Management Portal or the iris terminal command) to a predefined account on a containerized InterSystems IRIS instance.
  2. From the home page, select System Administration > Configuration > System Configuration > Namespaces to display the Namespaces page, then click the Create New Namespace button to display the New Namespace page.
  3. Create a namespace named USER2 by entering USER2 in the Name of the namespace box, selecting USER from the Copy from dropdown, clearing the Enable namespace for interoperability productions check-box and confirming that, clicking the Save button, and finally confirming that you want to copy all properties and mappings. Then click Close on the Copy Namespace Mappings page to return to the Namespaces page, on which the USER2 namespace is now listed. You have now altered the instance in the container.
  4. Next, stop the container and commit it as a new image called iris2, then list the available images.
    $ docker stop iris
    $ docker commit iris acme/iris2:test
    $ docker images
    REPOSITORY           TAG            IMAGE ID          CREATED        SIZE
    acme/iris2           test           421f6ca16b40      8 seconds ago  1.40GB
    acme/iris            stable         15627fb5cb76      3 days ago     1.39GB
    centos               7.3.1611       262f7381844c      2 weeks ago    192MB
    hello-world          latest         05a3bd381fc2      7 months ag    1.84kB
  5. Finally, remove the container created from the original iris image.
    $ docker rm iris

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-09-19 06:44:29