-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ACM-10761] Added RHTAP dockerfile (#658)
* added RHTAP dockerfile Signed-off-by: Disaiah Bennett <[email protected]> * updated dockerfiles Signed-off-by: Disaiah Bennett <[email protected]> * revert Dockerfile.test.prow Signed-off-by: Disaiah Bennett <[email protected]> --------- Signed-off-by: Disaiah Bennett <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Build the backplane-operator binary | ||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o backplane-operator main.go | ||
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
WORKDIR /app | ||
COPY --from=builder /workspace/backplane-operator . | ||
COPY --from=builder /workspace/pkg/templates pkg/templates | ||
|
||
USER 65532:65532 | ||
|
||
ENTRYPOINT ["/app/backplane-operator"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.21 AS builder | ||
|
||
WORKDIR /workspace | ||
|
||
COPY api/ api/ | ||
COPY test/function_tests/ test/function_tests/ | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
RUN go install github.com/onsi/ginkgo/v2/ginkgo@latest | ||
RUN ginkgo build test/function_tests/backplane_operator_install_test | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
|
||
ENV KUBECONFIG "/opt/.kube/config" | ||
ENV RESOURCE_DIR "resources" | ||
|
||
USER root | ||
WORKDIR /test | ||
|
||
COPY --from=builder /workspace/test/function_tests/backplane_operator_install_test/backplane_operator_install_test.test backplane_operator_install_test/backplane_operator_install_test.test | ||
COPY --from=builder /workspace/test/function_tests/resources/ resources/ | ||
|
||
CMD ["/test/backplane_operator_install_test/backplane_operator_install_test.test" , "-ginkgo.v"] |