Skip to content

chore: Support multi-arch containers build #461

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

Merged
merged 2 commits into from
Dec 25, 2023
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
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Base image to use at runtime
ARG base_image=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2021-12-01-1638322424

ARG target_arch=amd64

# Golang image to use for compiling the manager
ARG builder_image=public.ecr.aws/docker/library/golang

# Version of Golang
# Version of Golang
ARG golang_version

# Build the manager binary
Expand All @@ -15,14 +17,13 @@ ARG service_alias
ARG service_controller_git_version
ARG service_controller_git_commit
ARG build_date
ARG go_arch=amd64
# The directory within the builder container into which we will copy our
# service controller code.
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR $work_dir
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOARCH=$go_arch
ENV GOARCH=$target_arch
ENV GOOS=linux
ENV CGO_ENABLED=0
ENV VERSION_PKG=github.com/aws-controllers-k8s/$service_alias-controller/pkg/version
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG base_image=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-n
# Golang image to use for compiling the manager
ARG builder_image=public.ecr.aws/docker/library/golang

# Version of Golang
# Version of Golang
ARG golang_version

# Build the manager binary
Expand All @@ -15,14 +15,14 @@ ARG service_alias
ARG service_controller_git_version
ARG service_controller_git_commit
ARG build_date
ARG go_arch=amd64
ARG target_arch=amd64
# The directory within the builder container into which we will copy our
# service controller code.
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR $work_dir
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOARCH=$go_arch
ENV GOARCH=$target_arch
ENV GOOS=linux
ENV CGO_ENABLED=0
ENV VERSION_PKG=github.com/aws-controllers-k8s/$service_alias-controller/pkg/version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ metadata:
createdAt: {{.CreatedAt}}
support: {{.Annotations.Support}}
certified: {{.Annotations.IsCertified}}
labels:
operatorframework.io/os.linux: supported
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
name: ack-{{.ServicePackageName }}-controller.v0.0.0
namespace: placeholder
spec:
Expand Down