File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: Apache-2.0
44#
5- FROM registry.access.redhat.com/ubi9/ubi-micro:9.4 AS prod
5+ FROM registry.access.redhat.com/ubi9/ubi-micro:9.5 AS prod
66ARG BIN
77ARG ARCHBIN_PATH
8- ARG PORTS
98ARG TARGETOS
109ARG TARGETARCH
10+ ARG PORTS
11+
12+ # --- Create a non-root user (UBI-micro does not include useradd) ---
13+ USER 10001
14+
15+ # --- Create working directory ---
16+ WORKDIR /app
1117
12- COPY ${ARCHBIN_PATH}/${TARGETOS}-${TARGETARCH}/${BIN} /bin/${BIN}
18+ # --- Copy the architecture-specific binary ---
19+ COPY ${ARCHBIN_PATH}/${TARGETOS}-${TARGETARCH}/${BIN} /usr/local/bin/${BIN}
20+
21+ # --- Expose ports for Kubernetes/OpenShift ---
1322EXPOSE ${PORTS}
23+
24+ # --- Container metadata (OCI labels) ---
25+ LABEL name="${BIN}" \
26+ vendor="IBM" \
27+ maintainer="ZRL Decentralized Trust Group" \
28+ description="Production-grade ${BIN} microservice running on UBI-micro" \
29+ summary="Minimal, secure UBI-micro image for ${BIN}" \
30+ license="Apache-2.0"
31+
32+ # --- Set runtime entrypoint ---
33+ ENTRYPOINT ["/usr/local/bin/${BIN}" ]
You can’t perform that action at this time.
0 commit comments