Skip to content

Commit

Permalink
fix image name during build (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
M00nF1sh committed Apr 13, 2022
1 parent dd7615e commit 46c41f8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ HELM_CHART_NAME ?= "aws-vpc-cni"
TEST_IMAGE = amazon-k8s-cni-test
TEST_IMAGE_NAME = $(TEST_IMAGE)$(IMAGE_ARCH_SUFFIX):$(VERSION)

UNAME_ARCH = $(shell uname -m)
ARCH = $(lastword $(subst :, ,$(filter $(UNAME_ARCH):%,x86_64:amd64 aarch64:arm64)))
# This is only applied to the arm64 container image by default. Override to
# provide an alternate suffix or to omit.
IMAGE_ARCH_SUFFIX = $(addprefix -,$(filter $(ARCH),arm64))

# Mandate usage of docker buildkit as platform arguments are available only with buildkit
# Refer to https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
# and https://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds
export DOCKER_BUILDKIT=1
GOARCH = $(TARGETARCH)
# This is only applied to the arm64 container image by default. Override to
# provide an alternate suffix or to omit.
IMAGE_ARCH_SUFFIX = $(addprefix -,$(filter $(GOARCH),arm64))

# GOLANG_IMAGE is the building golang container image used.
GOLANG_IMAGE = public.ecr.aws/docker/library/golang:1.17-stretch
# For the requested build, these are the set of Go specific build environment variables.
Expand Down

0 comments on commit 46c41f8

Please sign in to comment.