Question
· Apr 9, 2023

Any chance I can provide a password to a vanilla iris docker instance?

Hi folks!

When I launch IRIS as a docker container instance, e.g. like this one:

docker run --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community

And then try to connect to it e.g. via irissqlcli it says I need to change the password:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Password change required

I know that I can open Management portal http://localhost:9092/csp/sys/UtilHome.csp and change password manually, but is there a programmatic way?

Say if I have a password in a file and I can just provide it to docker instance for the change?

Can anyone share the command line you use for that?

UPDATE:

Here is the approach. Start IRIS and disable password change requirement:

docker run --rm --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community -a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"

And another command to open sql terminal:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Use the approach only for development purposes.

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

Finally, here is how run iris docker container and use in SQL after that:

docker run --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community

and

docker exec -t iris-sql iris session iris -U %SYS '##class(Security.Users).UnExpireUserPasswords("*")'

And SQL connections now work!

$ irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Server:  InterSystems IRIS Version 2022.3.0.606 xDBC Protocol Version 65

Version: 0.5.1

[SQL]_SYSTEM@localhost:USER> select $zversion

+---------------------------------------------------------------------------------------------------------+

| Expression_1                                                                                            |

+---------------------------------------------------------------------------------------------------------+

| IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2022.3 (Build 606U) Mon Jan 30 2023 09:07:49 EST |

+---------------------------------------------------------------------------------------------------------+

1 row in set

Time: 0.047s

Thanks to @Robert Cemper and @Dmitry Maslennikov  
 

Finally, one command to run iris in docker:

docker run --rm --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community -a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"

And another command to open sql terminal:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Thanks to @Robert Cemper  and @Dmitry Maslennikov