使用iris-main
iris-main
是IRIS镜像的的ENTRYPOINT程序。 在Container中,ENTRYPOINT
指令允许你指定一个可执行程序或者脚本,作为容器启动后运行的主程序。这个程序会在容器启动时自动执行。
执行docker ps
命令可以看到当前container的ENTRYPOINT是什么:
hma@CNMBP23HMA demo % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8f31a857dc90 .../irishealth:2024.2 "/tini -- /iris-main" 3 days ago Up 3 days 2188/tcp, 52773/tcp, 53773/tcp, 54773/tcp, 0.0.0.0:1980->1972/tcp iris-a
hma@CNMBP23HMA demo %
我们可以用root进入container, 在根目录下查看iris-main的帮助, 或者查看在线文档的帮助-iris-main。
使用的iris-main例子
以下的compose文件中, 使用了--check-caps false
关闭了LInux的能力检查(capability check), 使用--key /install/iris.key
加载了IRIS的license文件,并且配置了--after /install/installer.sh
,它定义在container启动执行install.sh脚本。
iris-a:
image: containers.intersystems.com/intersystems/irishealth-arm64:2024.2
container_name: iris-a
hostname: irisa
ports:
- 1980:1972
- 52773:52773
environment:
- TZ=CST-8
volumes:
- ./install:/install
command:
--check-caps false
--key /install/iris.key
--after /install/installer.sh
附: iris-main的帮助
# 用root进入container, 在根目录下查看iris-main的帮助
root@irisa:/# /iris-main --help
USAGE:
/iris-main [--check-caps <bool>] [--monitorCPF <bool>] [--monitorKey
<bool>] [--ISCAgentPort <integer>] [--ISCAgent <bool>] [-k
<license key>] [-p <password file>] [-t <command>] [-c
<command>] [-e <command>] [-a <command>] [-b <command>] [-l
<log file>] [-s <bool>] [-u <bool>] [-d <bool>] [-i
<instance>] [--] [--version] [-h]
Where:
--check-caps <bool>
Does nothing; retained for backwards compatibility
--monitorCPF <bool>
Monitor InterSystems IRIS CPF merge file and apply if changes detected
--monitorKey <bool>
Monitor InterSystems IRIS license key and update if changes detected
--ISCAgentPort <integer>
Set the port for ISC Agent. The default value is 2188
--ISCAgent <bool>
Start ISC Agent before starting IRIS. If this argument is not
specified, it defaults to true
-k <license key>, --key <license key>
Copies the InterSystems IRIS license key from the directory specified
to the active data directory
-p <password file>, --password-file <password file>
File containing desired InterSystems IRIS password
-t <command>, --terminate <command>
Execute a shell command on application shutdown, after any other
arguments are processed
-c <command>, --create <command>
Execute a shell command at application startup, before any other
arguments are processed
-e <command>, --exit <command>
Execute shell commands after stopping InterSystems IRIS (via 'iris
stop')
-a <command>, --after <command>
Execute shell commands after starting InterSystems IRIS (via 'iris
start')
-b <command>, --before <command>
Execute shell commands before starting InterSystems IRIS (via 'iris
start')
-l <log file>, --log <log file>
InterSystems IRIS log file to be redirected to stdout for monitoring
via 'docker logs'
-s <bool>, --nostu <bool>
Start InterSystems IRIS with the 'nostu' option for maintenance,
single user access mode
-u <bool>, --up <bool>
Start InterSystems IRIS (via 'iris start') on container startup
-d <bool>, --down <bool>
Stop InterSystems IRIS (via 'iris stop') on container shutdown
-i <instance>, --instance <instance>
The InterSystems IRIS instance name to start/stop
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
iris-main
root@irisa:/#