FROM debian:buster RUN sed -i s/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g /etc/apt/sources.list && \ sed -i s/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g /etc/apt/sources.list RUN apt-get clean RUN apt-get update -y && \ apt-get install -y \ curl \ git \ make \ automake \ autoconf \ tar \ ca-certificates \ build-essential \ --no-install-recommends # prepare env ADD go-arm64.tgz /usr/local/ ENV GOROOT /usr/local/go ENV GOPATH /go ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin ENV GO111MODULE on ENV GOPROXY https://goproxy.cn,direct # cross complie env RUN apt-get install -y \ musl \ musl-tools \ --no-install-recommends && \ mkdir -p $GOPATH/bin || true ENV GOOS linux ENV GOARCH arm64 ENV CC /usr/bin/musl-gcc ENV LD /usr/bin/ld ENV AR /usr/bin/ar ENV CGO_ENABLED 1