ZendHQ Docker Image
We provide a ZendHQ container image suitable for use with Docker or Podman:
- cr.zend.com/zendhq
For a full list of available tags, including variants for ARM images, see our container registry cr.zend.com.
All ZendHQ container images can be configured via a combination of build arguments and /entrypoint.d/
scripts.
Build Arguments
Build Argument | Default | Purpose |
---|---|---|
OS_ID | One of "ubuntu", "debian", or "centos", based on image tag | Identifies the operating system |
OS_VERSION | Based on image tag | Identifies the operating system version used in image |
S6OVERLAY_VERSION | v2.2.0.3 | Identifies the version of the s6-overlay to use in the container; must be in the v2 series |
ZENDHQ_TOKEN | zendphp | The token to use when authenticating with ZendHQ |
The entrypoint.d directory
You may place the following in the /entrypoint.d/
directory, to have the following effects:
zendhqd.ini
: The file that is used as thezendhqd.ini
file by the container.default_monitor_rules.json
: Thedefault_monitor_rules.json
file that is used by the container to seed monitoring rules on zendhqd initialization.license
: Your ZendHQ license file.*.sh
: Any executable shell scripts in this directory are executed during container initialization.
Healthcheck
The ZendHQ images contain the script /usr/local/bin/healthcheck.sh
. Use this healthcheck in your orchestration to verify that the ZendHQ daemon is running.
As an example, from a docker-compose.yml configuration, use the following code:
healthcheck: test: /usr/local/bin/healthcheck.sh interval: 30s timeout: 10s retries: 5 start_period: 30s
ZendPHP User and Group
The Docker images create the following users and groups:
-
A
zendphp
user with UID 10000 -
A
zendphp
group with GID 10001
Use this user and group to set permissions of directories and files mounted through volumes, for example, the database directory.
FAQ
- If a
ZENDHQ_TOKEN
build argument is provided, its value is injected into thezendhqd.ini
file after it has been copied from the/entrypoint.d/
directory. - Any files in the
/entrypoint.d/
directory other than those listed in the above section are ignored. -
We recommend running the ZendHQ docker images as the
zendphp
user. -
If you wish to persist the ZendHQ database between invocations of the container, create a read/write volume, and map it to
/opt/zend/zendphp/var/db
in your container.
The following databases are persisted:-
codetracing.db holds any captured code traces
-
conf.db holds configuration that is distributed to PHP nodes (e.g. monitoring rules)
-
jobqueue.db holds the queue and job definitions, as well as job history.
-
monitor.db holds captured monitoring events.
-
user.db holds the group, user, and permissions entries for access management.
-
z_ray.db holds captured Z-Ray events.
-
-
For more information on Dockerfile customizations for RHEL customers, see Using RHEL-based-Docker-containers.