forked from sigstore/model-validation-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.model-validation-agent.rh
More file actions
35 lines (25 loc) · 1.28 KB
/
Dockerfile.model-validation-agent.rh
File metadata and controls
35 lines (25 loc) · 1.28 KB
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
32
33
34
35
# Build the validation-agent binary
FROM registry.redhat.io/ubi9/go-toolset:9.7-1775724628@sha256:8c5aeac74b4b60dc2e5e44f6b639186b7ec2fec8f0eb9a36d4a32dcf8e255f52 AS agent-builder
ARG TARGETOS
ARG TARGETARCH
WORKDIR /workspace
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/validation-agent/ cmd/validation-agent/
COPY internal/ internal/
COPY api/ api/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -a -o validation-agent cmd/validation-agent/main.go
# Use minimal base image to package the validation-agent binary
FROM registry.access.redhat.com/ubi9-minimal@sha256:d91be7cea9f03a757d69ad7fcdfcd7849dba820110e7980d5e2a1f46ed06ea3b
WORKDIR /
COPY --from=agent-builder /workspace/validation-agent /usr/local/bin/
USER 65532:65532
LABEL description="The image for the model-validation agent."
LABEL io.k8s.description="The image for the model-validation agent."
LABEL io.k8s.display-name="Model validation agent container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="model-validation-agent, Red Hat Trusted Artifact Signer."
LABEL summary="Validation agent for the model-validation operator."
LABEL com.redhat.component="model-validation-agent"
LABEL name="rhtas/model-validation-agent-rhel9"
ENTRYPOINT ["/usr/local/bin/validation-agent"]