generated from intersystems-community/iris-rest-api-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-zpm-webterminal
52 lines (41 loc) · 1.88 KB
/
Dockerfile-zpm-webterminal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
ARG IMAGE=intersystems/iris:2019.1.0S.111.0
ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
#ARG IMAGE=intersystems/iris:2019.3.0.302.0
ARG IMAGE=store/intersystems/iris-community:2019.3.0.302.0
FROM $IMAGE
USER root
WORKDIR /opt/app
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/app
USER irisowner
COPY ./Installer.cls ./
COPY ./src/cls ./src/cls
#COPY ./src/dfi ./src/dfi
RUN mkdir -p /tmp/deps \
&& cd /tmp/deps \
&& wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O zpm.xml
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly && \
/bin/echo -e \
"zn \"%SYS\"\n" \
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
" write \"Create web application ...\",!" \
" set webProperties(\"NameSpace\") = \"USER\"" \
" set webName = \"/person\"" \
" set webProperties(\"Enabled\") = 1" \
" set webProperties(\"AutheEnabled\") = 32" \
" set webProperties(\"DispatchClass\") = \"Sample.PersonREST\"" \
" set status = ##class(Security.Applications).Create(webName, .webProperties)" \
" write:'status \$system.Status.DisplayError(status)" \
" write \"Web application \"\"\"_webName_\"\"\" was created!\",!" \
"zn \"USER\"\n" \
" Do \$system.OBJ.Load(\"/tmp/deps/zpm.xml\", \"ck\")" \
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
" Set sc = ##class(App.Installer).setup(, 3)\n" \
" If 'sc do \$zu(4, \$JOB, 1)\n" \
" zpm \"install webterminal\"" \
" halt" \
| iris session $ISC_PACKAGE_INSTANCENAME && \
/bin/echo -e "sys\nsys\n" \
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
USER ${ISC_PACKAGE_MGRUSER}
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]