Skip to content

Commit cc88092

Browse files
committed
Try to fix "/cmd/main.go": no such file or directory
Signed-off-by: Theodor Mihalache <[email protected]>
1 parent 4dfa3ec commit cc88092

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

infra/feast-operator/Dockerfile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
# Build the manager binary
2-
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi8/go-toolset:1.22 AS builder
2+
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

6-
WORKDIR /workspace
76
# Copy the Go Modules manifests
87
COPY go.mod go.mod
98
COPY go.sum go.sum
109
# cache deps before building and copying source so that we don't need to re-download as much
1110
# and so that source changes don't invalidate our downloaded layer
1211
RUN go mod download
1312

14-
USER root
15-
16-
COPY ["Makefile", "./"]
17-
1813
RUN pwd && echo sdfljsdfljksdfljk1
1914
RUN ls && echo sdfljsdfljksdfljk1
2015
RUN ls /tmp/build/inputs && echo sdfljsdfljksdfljk1
2116

2217
# Copy the go source
23-
COPY cmd/ cmd/
24-
RUN ls && echo sdfljsdfljksdfljk
18+
COPY cmd/main.go cmd/main.go
2519
COPY api/ api/
26-
COPY internal/ internal/
20+
COPY internal/controller/ internal/controller/
2721

2822
# Build
2923
# 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/
3226
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
3327
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
3428

35-
# Use distroless as minimal base image to package the manager binary
36-
# Refer to https://github.com/GoogleContainerTools/distroless for more details
37-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
29+
FROM registry.access.redhat.com/ubi9/ubi-micro:9.5
3830
WORKDIR /
39-
COPY --from=builder /workspace/manager .
31+
COPY --from=builder /opt/app-root/src/manager .
4032
USER 65532:65532
4133

42-
ENTRYPOINT ["/manager"]
34+
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)