mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-06-14 14:24:00 +03:00
This speeds up building the Go builder image significantly (from hours to a few minutes), since the build speed was limited by the download speed from https://musl.cc , and this speed was extremely slow (e.g. 10kb/s and slower). This also improves build security, since the local mirror of musl.cc is under our control.
15 lines
551 B
Docker
15 lines
551 B
Docker
ARG go_builder_image=non-existing
|
|
FROM $go_builder_image
|
|
STOPSIGNAL SIGINT
|
|
RUN apk add git gcc musl-dev make wget --no-cache && \
|
|
mkdir /opt/cross-builder && \
|
|
cd /opt/cross-builder && \
|
|
for arch in aarch64 x86_64; do \
|
|
wget \
|
|
https://github.com/VictoriaMetrics/muslcc-mirror/releases/download/v1.0.0/${arch}-linux-musl-cross.tgz \
|
|
-O /opt/cross-builder/${arch}-musl.tgz \
|
|
--no-verbose && \
|
|
tar zxf ${arch}-musl.tgz -C ./ && \
|
|
rm /opt/cross-builder/${arch}-musl.tgz; \
|
|
done
|