diff --git a/infra/feast-operator/Dockerfile b/infra/feast-operator/Dockerfile index a15aba3f30..26e06e6822 100644 --- a/infra/feast-operator/Dockerfile +++ b/infra/feast-operator/Dockerfile @@ -1,9 +1,8 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:1.22 AS builder +FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS builder ARG TARGETOS ARG TARGETARCH -WORKDIR /workspace # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum @@ -11,19 +10,14 @@ COPY go.sum go.sum # and so that source changes don't invalidate our downloaded layer RUN go mod download -USER root - -COPY ["Makefile", "./"] - RUN pwd && echo sdfljsdfljksdfljk1 RUN ls && echo sdfljsdfljksdfljk1 RUN ls /tmp/build/inputs && echo sdfljsdfljksdfljk1 # Copy the go source -COPY cmd/ cmd/ -RUN ls && echo sdfljsdfljksdfljk +COPY cmd/main.go cmd/main.go COPY api/ api/ -COPY internal/ internal/ +COPY internal/controller/ internal/controller/ # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command @@ -32,11 +26,9 @@ COPY internal/ internal/ # by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/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 +FROM registry.access.redhat.com/ubi9/ubi-micro:9.5 WORKDIR / -COPY --from=builder /workspace/manager . +COPY --from=builder /opt/app-root/src/manager . USER 65532:65532 -ENTRYPOINT ["/manager"] +ENTRYPOINT ["/manager"] \ No newline at end of file