Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to public ECR for AL2 #1804

Merged
merged 4 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ HELM_CHART_NAME ?= "aws-vpc-cni"
# TEST_IMAGE is the testing environment container image.
TEST_IMAGE = amazon-k8s-cni-test
TEST_IMAGE_NAME = $(TEST_IMAGE)$(IMAGE_ARCH_SUFFIX):$(VERSION)
# These values derive ARCH and DOCKER_ARCH which are needed by dependencies in
# These values derive ARCH which is needed by dependencies in
# image build defaulting to system's architecture when not specified.
#
# UNAME_ARCH is the runtime architecture of the building host.
Expand All @@ -52,9 +52,6 @@ UNAME_ARCH = $(shell uname -m)
#
# These are pairs of input_arch to derived_arch separated by colons:
ARCH = $(lastword $(subst :, ,$(filter $(UNAME_ARCH):%,x86_64:amd64 aarch64:arm64)))
# DOCKER_ARCH is the docker specific architecture specifier used for building on
# multiarch container images.
DOCKER_ARCH = $(lastword $(subst :, ,$(filter $(ARCH):%,amd64:amd64 arm64:arm64v8)))
# IMAGE_ARCH_SUFFIX is the `-arch` suffix included in the container image name.
#
# This is only applied to the arm64 container image by default. Override to
Expand Down Expand Up @@ -96,7 +93,6 @@ DOCKER_RUN_FLAGS = --rm -ti $(DOCKER_ARGS)
# DOCKER_BUILD_FLAGS is the set of flags passed during container image builds
# based on the requested build.
DOCKER_BUILD_FLAGS = --build-arg GOARCH="$(ARCH)" \
--build-arg docker_arch="$(DOCKER_ARCH)" \
--build-arg golang_image="$(GOLANG_IMAGE)" \
--network=host \
$(DOCKER_ARGS)
Expand Down
3 changes: 1 addition & 2 deletions scripts/dockerfiles/Dockerfile.init
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ARG docker_arch
ARG golang_image

FROM $golang_image as builder
Expand All @@ -14,7 +13,7 @@ RUN make plugins && make debug-script
COPY . ./

# Build the architecture specific container image:
FROM $docker_arch/amazonlinux:2
FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN yum update -y && \
yum install -y iproute procps-ng && \
yum clean all
Expand Down
3 changes: 1 addition & 2 deletions scripts/dockerfiles/Dockerfile.metrics
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ARG docker_arch
ARG golang_image

FROM $golang_image as builder
Expand All @@ -16,7 +15,7 @@ RUN go mod download
COPY . ./
RUN make build-metrics

FROM $docker_arch/amazonlinux:2
FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN yum update -y && \
yum clean all

Expand Down
3 changes: 1 addition & 2 deletions scripts/dockerfiles/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ARG docker_arch
ARG golang_image

FROM $golang_image as builder
Expand All @@ -19,7 +18,7 @@ COPY . ./
RUN make build-linux

# Build the architecture specific container image:
FROM $docker_arch/amazonlinux:2
FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN yum update -y && \
yum install -y iptables iproute jq && \
yum clean all
Expand Down
1 change: 0 additions & 1 deletion scripts/dockerfiles/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ARG docker_arch
ARG golang_image
FROM $golang_image
WORKDIR /go/src/github.com/aws/amazon-vpc-cni-k8s
Expand Down