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

linux/arm64 support #20

Closed
wants to merge 1 commit into from
Closed
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: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.19
ARG TARGETOS
ARG TARGETARCH
ARG CODEGEN_VERSION="1.26.0"
ARG CONTROLLER_GEN_VERSION="0.11.1"

Expand All @@ -25,7 +27,7 @@ RUN wget http://github.com/kubernetes/code-generator/archive/kubernetes-${CODEGE
wget https://github.com/kubernetes-sigs/controller-tools/archive/v${CONTROLLER_GEN_VERSION}.tar.gz && \
tar xvf ./v${CONTROLLER_GEN_VERSION}.tar.gz && \
cd ./controller-tools-${CONTROLLER_GEN_VERSION}/ && \
go build -o controller-gen ./cmd/controller-gen/ && \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o controller-gen ./cmd/controller-gen/ && \
mv ./controller-gen /usr/bin/ && \
rm -rf ../v${CONTROLLER_GEN_VERSION}.tar.gz && \
rm -rf ../controller-tools-${CONTROLLER_GEN_VERSION}
Expand All @@ -46,4 +48,4 @@ USER codegen

WORKDIR /usr/bin

CMD ["update-codegen.sh"]
CMD ["update-codegen.sh"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ default: build

.PHONY: build
build:
docker build -t $(IMAGE) .
docker buildx build --platform linux/amd64,linux/arm64 -t $(IMAGE) .