Skip to content

Commit 36f9b59

Browse files
committed
Add new target for building docker images with no tests
1 parent c80fd41 commit 36f9b59

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ VERSION ?= $(GIT_VERSION)
1313
IMAGE ?= $(REPO):$(VERSION)
1414
BASE_IMAGE ?= public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:latest.2
1515
GOLANG_VERSION ?= $(shell cat .go-version)
16-
BUILD_IMAGE ?= public.ecr.aws/bitnami/golang:$(GOLANG_VERSION)
16+
GO_IMAGE_TAG=$(shell cat .go-version | cut -f 1-2 -d".")
17+
BUILD_IMAGE ?= public.ecr.aws/docker/library/golang:$(GO_IMAGE_TAG)
1718
GOARCH ?= amd64
1819
PLATFORM ?= linux/amd64
1920

@@ -79,6 +80,11 @@ docker-buildx: check-env test
7980
docker-build: check-env test
8081
docker build --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg ARCH=$(GOARCH) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) . -t ${IMAGE}
8182

83+
84+
# Build the docker image with buildx and no tests
85+
docker-buildx-no-test:
86+
docker buildx build --platform=$(PLATFORM) -t $(IMAGE)_$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg $(GOARCH) --load .
87+
8288
# Push the docker image
8389
docker-push: check-env
8490
docker push ${IMAGE}

0 commit comments

Comments
 (0)