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 requiredI 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/USERUse the approach only for development purposes.
Comments
Thanks @Robert Cemper !
But I want something I can use via CLI (Command line) interface in a non-interactive way.
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-communityand
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.047sThanks to @Robert Cemper and @Dmitry Maslennikov
Or just add this to the end of docker run command
-a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"
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/USERThanks to @Robert Cemper and @Dmitry Maslennikov
This seems appropriate ... Vanilla IRIS
.png)
IRIS IRIS Baby ...
heh )
Should I consider it as an accepted answer? :)
Nice hat, though! @Robert Cemper, do you have a such in your collection?
Not that impressive. My skin is just pale and hairy. Model OLD WHITE MAN.jpg)
There is a new release in intersystemsdc community images.
Now password and username can be provided as env variables.
Here it is:
docker run --rm --name iris-sql -d -p 9091:1972 -p 9092:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community
and
irissqlcli iris://demo:demo@localhost:9091/USER