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:
The host identifier is the hostname or IP address of the system the container is running on; if your browser is running on the same system as the container, you can use localhost.
The web server port number is the host port number to which you published the instance’s web server port number, which is 52773, when you started the container with docker run. Assuming you included --publish 52773:52773 as provided in the sample command at the end of the previous section, the web server port number is 52773.
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.
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.
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.
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
Finally, remove the container created from the original iris image.
Content Date/Time: 2019-09-19 06:44:29