File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,20 @@ COPY go.sum go.sum
12
12
RUN go mod download
13
13
14
14
# Copy the go source
15
- COPY cmd/main.go cmd/main.go
16
- COPY api/ api/
17
- COPY internal/controller/ internal/controller/
15
+ COPY . .
18
16
19
17
# Build
20
18
# the GOARCH has not a default value to allow the binary be built according to the host where the command
21
19
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
22
20
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
23
21
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
24
- RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
22
+ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64 } go build -a -o tke-extend-network-controller cmd/main.go
25
23
26
24
# Use distroless as minimal base image to package the manager binary
27
25
# Refer to https://github.com/GoogleContainerTools/distroless for more details
28
26
FROM gcr.io/distroless/static:nonroot
29
27
WORKDIR /
30
- COPY --from=builder /workspace/manager .
28
+ COPY --from=builder /workspace/tke-extend-network-controller .
31
29
USER 65532:65532
32
30
33
- ENTRYPOINT ["/manager " ]
31
+ ENTRYPOINT ["/tke-extend-network-controller " ]
Original file line number Diff line number Diff line change 1
1
# Image URL to use all building/pushing image targets
2
- IMG ?= controller:latest
2
+ IMG ?= imroc/tke-extend-network- controller:latest
3
3
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
4
4
ENVTEST_K8S_VERSION = 1.30.0
5
5
@@ -97,6 +97,9 @@ docker-build: ## Build docker image with the manager.
97
97
docker-push : # # Push docker image with the manager.
98
98
$(CONTAINER_TOOL ) push ${IMG}
99
99
100
+ .PHONY : docker-build-push
101
+ docker-build-push : docker-build docker-push
102
+
100
103
# PLATFORMS defines the target platforms for the manager image be built to provide support to multiple
101
104
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
102
105
# - be able to use docker buildx. More info: https://docs.docker.com/build/buildx/
You can’t perform that action at this time.
0 commit comments