Skip to content

Commit

Permalink
PCP-2001: updated builder image and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamrajvanshi committed Oct 18, 2023
1 parent ff78a01 commit ba19450
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG BUILDER_GOLANG_VERSION
# Build the manager binary
FROM --platform=linux/amd64 gcr.io/spectro-images-public/golang:1.19-alpine as builder
FROM --platform=linux/amd64 gcr.io/spectro-images-public/golang:${BUILDER_GOLANG_VERSION}-alpine as builder

ARG HELM=./bin/helm-linux-amd64
ARG HELM_CHART=./bin/vcluster-0.13.0.tgz
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

.DEFAULT_GOAL:=help

BUILDER_GOLANG_VERSION ?= 1.21
BUILD_DATE:=$(shell date +%Y%m%d)
IMG_NAME ?= cluster-api-virtual-controller
IMG_URL ?= gcr.io/spectro-dev-public/release/cluster-api-virtual
IMG_TAG ?= v0.1.3-spectro-20221213
# IMG_URL ?= gcr.io/spectro-images-public/release/cluster-api-virtual/
IMG_URL ?= gcr.io/spectro-common-dev/${USER}/cluster-api-virtual
IMG_TAG ?= v0.1.3-spectro-${BUILD_DATE}
IMG ?= $(IMG_URL)/$(IMG_NAME):$(IMG_TAG)
BUILD_ARGS = --build-arg CRYPTO_LIB=${FIPS_ENABLE} --build-arg BUILDER_GOLANG_VERSION=${BUILDER_GOLANG_VERSION}

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
Expand Down Expand Up @@ -87,7 +91,7 @@ run: manifests generate fmt vet ## Run a controller from your host.

.PHONY: docker-build
docker-build: binaries ## Build docker image with the manager.
docker build -t ${IMG} .
docker build ${BUILD_ARGS} -t ${IMG} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand Down

0 comments on commit ba19450

Please sign in to comment.