Skip to content
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
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base image to use for the final stage
ARG base_image=amazonlinux:2
ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2
# Build the manager binary
FROM golang:1.14.1 as builder
FROM public.ecr.aws/bitnami/golang:1.15.15 as builder

ARG service_alias
# The tuple of controller image version information
Expand All @@ -12,9 +12,7 @@ ARG build_date
# service controller code.
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR $work_dir
# For building Go Module required
# TODO(vijtrip2): After golang update to 1.15 or later, replace ',' with '|'
ENV GOPROXY=https://proxy.golang.org,direct
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOARCH=amd64
ENV GOOS=linux
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base image to use at runtime
ARG base_image=amazonlinux:2
ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2
# Build the manager binary
FROM golang:1.14.1 as builder
FROM public.ecr.aws/bitnami/golang:1.15.15 as builder

ARG service_alias
# The tuple of controller image version information
Expand All @@ -12,8 +12,7 @@ ARG build_date
# service controller code.
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR $work_dir
# For building Go Module required
ENV GOPROXY=https://proxy.golang.org,direct
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOARCH=amd64
ENV GOOS=linux
Expand Down
3 changes: 3 additions & 0 deletions scripts/build-controller-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ if [[ $QUIET = "false" ]]; then
echo " git commit: $SERVICE_CONTROLLER_GIT_COMMIT"
fi

# Log into ECR public to access base images
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

# if local build
# then use Dockerfile which allows references to local modules from service controller
DOCKER_BUILD_CONTEXT="$ACK_DIR"
Expand Down