|
| 1 | +# useful commands |
| 2 | +## clean up docker |
| 3 | +use it when docker says "There is no space left on device". It will remove built but not used images and other temporary files. |
| 4 | +``` |
| 5 | +docker system prune -f |
| 6 | +``` |
| 7 | + |
| 8 | +``` |
| 9 | +docker rm -f $(docker ps -qa) |
| 10 | +``` |
| 11 | + |
| 12 | +## build container with no cache |
| 13 | +``` |
| 14 | +docker-compose build --no-cache --progress=plain |
| 15 | +``` |
| 16 | +## start iris container |
| 17 | +``` |
| 18 | +docker-compose up -d |
| 19 | +``` |
| 20 | + |
| 21 | +## open iris terminal in docker |
| 22 | +``` |
| 23 | +docker exec iris iris session iris -U IRISAPP |
| 24 | +``` |
| 25 | + |
| 26 | + |
| 27 | +## import objectscirpt code |
| 28 | + |
| 29 | +do $System.OBJ.LoadDir("/home/irisowner/dev/src","ck",,1) |
| 30 | +## map iris key from Mac home directory to IRIS in container |
| 31 | +- ~/iris.key:/usr/irissys/mgr/iris.key |
| 32 | + |
| 33 | +## install git in the docker image |
| 34 | +## add git in dockerfile |
| 35 | +USER root |
| 36 | +RUN apt update && apt-get -y install git |
| 37 | + |
| 38 | +USER ${ISC_PACKAGE_MGRUSER} |
| 39 | + |
| 40 | + |
| 41 | +## install docker-compose |
| 42 | +``` |
| 43 | +sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
| 44 | +
|
| 45 | +sudo chmod +x /usr/local/bin/docker-compose |
| 46 | +
|
| 47 | +``` |
| 48 | + |
| 49 | +## load and test module |
| 50 | +``` |
| 51 | +
|
| 52 | +zpm "load /home/irisowner/dev" |
| 53 | +
|
| 54 | +zpm "test dc-sample" |
| 55 | +``` |
| 56 | + |
| 57 | +## select zpm test registry |
| 58 | +``` |
| 59 | +repo -n registry -r -url https://test.pm.community.intersystems.com/registry/ -user test -pass PassWord42 |
| 60 | +``` |
| 61 | + |
| 62 | +## get back to public zpm registry |
| 63 | +``` |
| 64 | +repo -r -n registry -url https://pm.community.intersystems.com/ -user "" -pass "" |
| 65 | +``` |
| 66 | + |
| 67 | +## export a global in runtime into the repo |
| 68 | +``` |
| 69 | +d $System.OBJ.Export("GlobalD.GBL","/irisrun/repo/src/gbl/GlobalD.xml") |
| 70 | +``` |
| 71 | + |
| 72 | +## create a web app in dockerfile |
| 73 | +``` |
| 74 | +zn "%SYS" \ |
| 75 | + write "Create web application ...",! \ |
| 76 | + set webName = "/csp/irisweb" \ |
| 77 | + set webProperties("NameSpace") = "IRISAPP" \ |
| 78 | + set webProperties("Enabled") = 1 \ |
| 79 | + set webProperties("CSPZENEnabled") = 1 \ |
| 80 | + set webProperties("AutheEnabled") = 32 \ |
| 81 | + set webProperties("iKnowEnabled") = 1 \ |
| 82 | + set webProperties("DeepSeeEnabled") = 1 \ |
| 83 | + set sc = ##class(Security.Applications).Create(webName, .webProperties) \ |
| 84 | + write "Web application "_webName_" has been created!",! |
| 85 | +``` |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +``` |
| 90 | +do $SYSTEM.OBJ.ImportDir("/opt/irisbuild/src",, "ck") |
| 91 | +``` |
| 92 | + |
| 93 | + |
| 94 | +### run tests described in the module |
| 95 | + |
| 96 | +IRISAPP>zpm |
| 97 | +IRISAPP:zpm>load /irisrun/repo |
| 98 | +IRISAPP:zpm>test package-name |
| 99 | + |
| 100 | +### install ZPM with one line |
| 101 | + // Install ZPM |
| 102 | + 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) |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | +docker run --rm --name iris-sql -d -p 9091:1972 -p 9092:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community |
| 108 | + |
| 109 | + |
| 110 | +docker run --rm --name iris-ce -d -p 9091:1972 -p 9092:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community -a "echo 'zpm \"install webterminal\"' | iriscli" |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +docker run --rm --name iris-sql -d -p 9092:52773 containers.intersystems.com/intersystems/iris-community:2023.1.0.229.0 |
| 115 | + |
| 116 | + |
| 117 | +docker run --rm --name iris-ce -d -p 9092:52773 containers.intersystems.com/intersystems/iris-community:2023.1.0.229.0 |
0 commit comments