Skip to content

Commit

Permalink
chore: add Containerfile for validation
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto González <[email protected]>
  • Loading branch information
ernesgonzalez33 committed Sep 19, 2024
1 parent db6782b commit 7bd8fd2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build/validation/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM registry.access.redhat.com/ubi9/go-toolset:1.21.11-9 AS forklift-opa
WORKDIR /opa/app
COPY --chown=1001:0 ./ ./
ENV GOFLAGS "-mod=vendor -tags=strictfipsruntime"
ENV GOEXPERIMENT strictfipsruntime

RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /tmp/opa github.com/open-policy-agent/opa

FROM registry.access.redhat.com/ubi9-minimal:9.4-1227.1725849298
RUN microdnf -y update && microdnf -y clean all

COPY opa/app/validation/policies /usr/share/opa/policies/
COPY opa/app/validation/entrypoint.sh /usr/bin/
COPY --from=forklift-opa /tmp/opa /usr/bin/opa

ENTRYPOINT ["/usr/bin/entrypoint.sh"]

LABEL \
com.redhat.component="forklift-validation-container" \
version="$CI_VERSION" \
name="forklift/forklift-validation-rhel9" \
license="Apache License 2.0" \
io.k8s.display-name="Forklift" \
io.k8s.description="Forklift - Validation Service" \
io.openshift.tags="migration,mtv,forklift" \
summary="Forklift - Validation Service" \
maintainer="Forklift by Konveyor Community <[email protected]>"

0 comments on commit 7bd8fd2

Please sign in to comment.