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

Fix multi-arch local mode build #384

Merged
merged 3 commits into from
Apr 23, 2024
Merged
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
14 changes: 11 additions & 3 deletions docker/local/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ RUN yarn build

FROM clickhouse/clickhouse-server:23.11.1-alpine AS clickhouse_base

# Pull in the target platform
ARG TARGETPLATFORM

# Clean up 390MB of unused CH binaries
RUN rm -rf /usr/bin/clickhouse-odbc-bridge /usr/bin/clickhouse-library-bridge /usr/bin/clickhouse-diagnostics
FROM scratch as base
Expand All @@ -70,9 +73,14 @@ EXPOSE 1888 4317 4318 55679 13133

RUN apk update
RUN apk add wget shadow
RUN wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.90.1/otelcol-contrib_0.90.1_linux_arm64.apk && \
apk add --allow-untrusted otelcol-contrib_0.90.1_linux_arm64.apk && \
rm -rf otelcol-contrib_0.90.1_linux_arm64.apk
# Check the target platform and choose the appropriate package
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.90.1/otelcol-contrib_0.90.1_linux_arm64.apk; \
else \
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.90.1/otelcol-contrib_0.90.1_linux_amd64.apk; \
Comment on lines +77 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to throw if the platform is not supported

fi && \
apk add --allow-untrusted otelcol-contrib_0.90.1_linux_*.apk && \
rm -rf otelcol-contrib_0.90.1_linux_*.apk

# == Install Node Deps ==

Expand Down
Loading