File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 1
1
# 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
3
3
ARG TARGETOS
4
4
ARG TARGETARCH
5
5
6
- WORKDIR /workspace
7
6
# Copy the Go Modules manifests
8
7
COPY go.mod go.mod
9
8
COPY go.sum go.sum
10
9
# cache deps before building and copying source so that we don't need to re-download as much
11
10
# and so that source changes don't invalidate our downloaded layer
12
11
RUN go mod download
13
12
14
- USER root
15
-
16
- COPY ["Makefile" , "./" ]
17
-
18
13
RUN pwd && echo sdfljsdfljksdfljk1
19
14
RUN ls && echo sdfljsdfljksdfljk1
20
15
RUN ls /tmp/build/inputs && echo sdfljsdfljksdfljk1
21
16
22
17
# Copy the go source
23
- COPY cmd/ cmd/
24
- RUN ls && echo sdfljsdfljksdfljk
18
+ COPY cmd/main.go cmd/main.go
25
19
COPY api/ api/
26
- COPY internal/ internal/
20
+ COPY internal/controller/ internal/controller /
27
21
28
22
# Build
29
23
# 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/
32
26
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
33
27
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
34
28
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
38
30
WORKDIR /
39
- COPY --from=builder /workspace /manager .
31
+ COPY --from=builder /opt/app-root/src /manager .
40
32
USER 65532:65532
41
33
42
- ENTRYPOINT ["/manager" ]
34
+ ENTRYPOINT ["/manager" ]
You can’t perform that action at this time.
0 commit comments