Skip to content

Commit 0715ec6

Browse files
authored
enhancement: Dockerfiles and Go Mod version (#113)
Signed-off-by: Sathvik <Sathvik.S@ibm.com>
1 parent 67fb858 commit 0715ec6

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
# limitations under the License.
1414

1515
# Build the manager binary
16-
FROM --platform=$BUILDPLATFORM golang:1.24 AS builder
16+
FROM --platform=$BUILDPLATFORM golang:1.25 AS builder
1717
ARG TARGETOS
1818
ARG TARGETARCH
1919

2020
WORKDIR /workspace
2121
# Copy the Go Modules manifests
22-
COPY go.mod go.mod
23-
COPY go.sum go.sum
22+
COPY go.mod go.sum ./
2423
# cache deps before building and copying source so that we don't need to re-download as much
2524
# and so that source changes don't invalidate our downloaded layer
2625
RUN go mod download

Dockerfile.reporter

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.24 AS builder
1+
FROM --platform=$BUILDPLATFORM golang:1.25 AS builder
22
ARG TARGETOS
33
ARG TARGETARCH
44

55
WORKDIR /workspace
66

7-
COPY go.mod go.mod
8-
COPY go.sum go.sum
7+
COPY go.mod go.sum ./
98

109
RUN go mod download
1110

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
176176
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
177177
.PHONY: docker-build
178178
docker-build: ## Build docker image with the manager.
179-
$(CONTAINER_TOOL) build -t ${IMG_PREFIX}:${IMG_TAG} .
179+
DOCKER_BUILDKIT=1 $(CONTAINER_TOOL) build -t ${IMG_PREFIX}:${IMG_TAG} .
180180

181181
.PHONY: docker-push
182182
docker-push: ## Push docker image with the manager.
@@ -198,7 +198,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
198198

199199
.PHONY: docker-build-reporter
200200
docker-build-reporter: ## Build docker image with the reporter.
201-
$(CONTAINER_TOOL) build -f Dockerfile.reporter -t ${IMG_PREFIX}:${IMG_TAG} .
201+
DOCKER_BUILDKIT=1 $(CONTAINER_TOOL) build -f Dockerfile.reporter -t ${IMG_PREFIX}:${IMG_TAG} .
202202

203203
.PHONY: docker-push-reporter
204204
docker-push-reporter: ## Push docker image with the reporter.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/node-readiness-controller
22

3-
go 1.24.0
3+
go 1.25
44

55
require (
66
github.com/onsi/ginkgo/v2 v2.27.2

0 commit comments

Comments
 (0)