Skip to content

Commit 75711ab

Browse files
committed
Adding support for production grade image in Dockerfile
Signed-off-by: Anushka <anush159@in.ibm.com>
1 parent 312d6e9 commit 75711ab

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

docker/images/release/Dockerfile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,32 @@
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
66
ARG BIN
77
ARG ARCHBIN_PATH
8-
ARG PORTS
98
ARG TARGETOS
109
ARG 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 ---
1322
EXPOSE ${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}"]

0 commit comments

Comments
 (0)