-
Notifications
You must be signed in to change notification settings - Fork 55
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
Build multiarch docker images on tag #116
Build multiarch docker images on tag #116
Conversation
Okay, fixed the docker pathing issue. Now it's failing on installing protoc_gen_lint here - this runs fine locally for me. |
Okay, so I've confirmed that the TARGETARCH build arg isn't getting set by the buildx command as expected - see here. I'm working on a way to detect the target arch and set the arg another way. This works when run and setting the build arg manually like this |
Well, it looks like the problem was that the generic top level ARG default was overriding the ones passed in. After removing, it seems to have worked. However, the build is now super at more than 2 hours. This is likely because we're using QEMU and compiling our own grpc binaries. Maybe we could source prebuilt binaries from somewhere else? |
I'm not sure what we should do. Practically speaking, it's easy enough for me to find an amd64 machine to build with. 🤣 |
@MikeGoldsmith do you mean that the build time is 2 hours to build the docker images? That doesn't sound like a problem, and it would be great to get this merged. |
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.
I've tried to use the docker images built using this branch and it seems we're not quite ready to build arm64 binaries using these tools. The grpc_cpp_plugin
segfaults:
# ./grpc_cpp_plugin
Segmentation fault
That was the only one of the following list that segfaults:
# ls -l *plugin*
-rwxr-xr-x 1 root root 31352 Sep 19 17:35 grpc_cpp_plugin
-rwxr-xr-x 1 root root 27912 Sep 19 17:35 grpc_csharp_plugin
-rwxr-xr-x 1 root root 27384 Sep 19 17:35 grpc_node_plugin
-rwxr-xr-x 1 root root 22736 Sep 19 17:35 grpc_objective_c_plugin
-rwxr-xr-x 1 root root 32960 Sep 19 17:35 grpc_php_plugin
-rwxr-xr-x 1 root root 16512 Sep 19 17:35 grpc_python_plugin
-rwxr-xr-x 1 root root 22520 Sep 19 17:35 grpc_ruby_plugin
FROM alpine:${ALPINE_VERSION} as protoc_builder | ||
ARG TARGETPLATFORM | ||
RUN echo "I'm building for $TARGETPLATFORM" |
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.
RUN echo "I'm building for $TARGETPLATFORM" | |
RUN echo "open-telemetry/build-tools building for $TARGETPLATFORM" |
I was mistaken, the |
How to repeat the results quoted above: In this branch, I ran:
Then, in an otel-proto repository:
|
I was about to open a similar PR (didn't notice this one)...is anybody still working on this one? |
Updates the github workflow to use standard docker actions to build and publish multi-arch images when a git tag is pushed.
The workflow creates two tags,
latest
and one that is the git tag with the leading v stripped off. For example, the tagv1.2.3
would create an image with tagslatest
and1.2.3
.