-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 917 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.25.5@sha256:359dd4c6c4255b3f7bce4dc15ffa5a9aa65a401f819048466fa91baa8244a793 AS build
USER root
ENV GOFLAGS="-mod=mod"
RUN mkdir /src
WORKDIR /src
COPY go.* ./
RUN go mod download
COPY . ./
ARG TARGETARCH
RUN make probe GOOS=linux GOARCH=${TARGETARCH}
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0 as standard
RUN microdnf install shadow-utils
RUN useradd -u 1001 unprivilegeduser
# Switch to non-root user
USER unprivilegeduser
COPY --from=build /src/probe/bin /stackrox/
EXPOSE 7070
ENTRYPOINT ["/stackrox/probe"]
CMD ["start"]
LABEL name="probe" \
vendor="Red Hat, Inc." \
version="0.0.1" \
summary="Blackbox monitoring probe for ACS Fleet Manager" \
description="Blackbox monitoring probe for the Red Hat Advanced Cluster Security Fleet Manager"