# Extends the BMC-provided plugin server base image with the APL Restful ARDBC plugin.
#
# pluginsvr_base is not pulled directly from containers.bmc.com. BMC's Docker
# Trusted Registry is hosted on docker.io; sync it into your own local Harbor
# registry first (see docs.helixops.ai: "Setting up a Harbor repository to
# synchronize container images", brid26201), then point REGISTRY below at
# that Harbor host.
#
# HELIX_VERSION must match your BMC Helix on-premise deployment version.
# Look up your version tag in your local Harbor registry, e.g.:
#   <your-harbor-registry>/bmc/pluginsvr_base:25101-RTM   (Helix 25.1.01)
#   <your-harbor-registry>/bmc/pluginsvr_base:23301-RTM   (Helix 23.3.01)
#   <your-harbor-registry>/bmc/pluginsvr_base:22106-RTM   (Helix 22.1.06)
#
# Build with:
#   docker build \
#     --build-arg REGISTRY=<your-harbor-registry> \
#     --build-arg HELIX_VERSION=25101-RTM \
#     -t apl-restful-ardbc-pluginsvr:5.0 .
#
# Or use build.ps1 which stages the JARs and runs this automatically.

ARG REGISTRY=<your-harbor-registry>
ARG HELIX_VERSION=25101-RTM

FROM ${REGISTRY}/bmc/pluginsvr_base:${HELIX_VERSION}

# Copy plugin JARs and config into the plugin server directory.
# The base image runs as bmcuser:bmc; g+rw lets the entrypoint
# substitute template variables into pluginsvr_config.xml at startup.
ADD --chown=bmcuser:bmc --chmod=g+rw pluginsvr /opt/bmc/ARSystem/pluginsvr
