Open kvrhdn opened 3 years ago
I don't have an M1 so hard to test, but I can review a PR :)
This isn't really a solution yet, but for documentation sake:
When I apply the following changes and rebuild the Docker image it works on Apple M1:
diff --git a/protobuf/Dockerfile b/protobuf/Dockerfile
index 14b92c9..73be1fd 100644
--- a/protobuf/Dockerfile
+++ b/protobuf/Dockerfile
@@ -99,7 +99,7 @@ RUN cd / && \
mkdir -p /protoc-gen-lint-out && \
cd /protoc-gen-lint-out && \
unzip -q /protoc-gen-lint_linux_amd64.zip && \
- install -Ds /protoc-gen-lint-out/protoc-gen-lint /out/usr/bin/protoc-gen-lint
+ install -D /protoc-gen-lint-out/protoc-gen-lint /out/usr/bin/protoc-gen-lint
ARG GRPC_GATEWAY_VERSION
RUN mkdir -p ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway && \
@@ -121,7 +121,7 @@ FROM alpine:${ALPINE_VERSION} as packer
RUN apk add --no-cache curl
ARG UPX_VERSION
-RUN mkdir -p /upx && curl -sSL https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz | tar xJ --strip 1 -C /upx && \
+RUN mkdir -p /upx && curl -sSL https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-arm64_linux.tar.xz | tar xJ --strip 1 -C /upx && \
install -D /upx/upx /usr/local/bin/upx
# Use all output including headers and protoc from protoc_builder
I am not sure why only UPX needs that arm64 version, the amd64 version causes a segmentation fault 🤷🏻
Hi! We use the
otel/build-protobuf
image in Tempo, it is run as part ofmake vendor-check
: https://github.com/grafana/tempo/blob/055573362709a02e2ca6aa98400a3de38c91c4a1/Makefile#L123I'm the first person on the team using the Apple M1 and using this image results in an error (full log at the end):
The recommended way to solve this is by providing multi-arch Docker images. Similar work was done in Tempo itself: this requires the pipeline to be adapted so it builds both amd64 and arm64 images and the Dockerfile is parameterised to accept a target arch.
Is this work you would consider accepting?
Full log: