-
Notifications
You must be signed in to change notification settings - Fork 350
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
feat: make Docker images ARM-friendly #1193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dockerfile.alpine
Outdated
RUN go get ./... | ||
RUN go build -ldflags "-X main.metadataString=container.alpine" -o cloud_sql_proxy ./cmd/cloud_sql_proxy | ||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My uninformed opinion is that we should always build static binaries, including for Alpine and Buster. However, this is a change from previous versions. Do we need to disable CGO for the multi arch builds? If not, let's remove this from the diff in this and buster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this removing the CGO_ENABLED=0
flag on my M1 mac and it works, so I agree, let's remove from the diff
Change Description
Enable multiarchitecture builds in Cloud Build to make our Docker images compatible with ARM64 Linux and MacOS.
Fixes #798