Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Install ZPM in one line

Discussion
Sergey Mikhailenko · Feb 21, 2021

Install ZPM in one line

Hi developers.
I often miss the ZPM program on a clean system.
Nothing complicated? Take and install.
And in one line? Especially in a docker container.
There is a solution. I'm very happy with it;)
Maybe the line can be shortened?

set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.SSLConfiguration=name, st=ht.Get(comp("path")) quit:'st $System.Status.GetErrorText(st) set xml=##class(%File).TempFilename("xml"), tFile = ##class(%Stream.FileBinary).%New(), tFile.Filename = xml do tFile.CopyFromAndSave(ht.HttpResponse.Data) do ht.%Close(), $system.OBJ.Load(xml,"ck") do ##class(%File).Delete(xml)
#ObjectScript #InterSystems IRIS #InterSystems IRIS for Health

Source URL:https://community.intersystems.com/post/install-zpm-one-line