Dockerfile.build.base-aarch64.aarch64 849 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. FROM debian:buster
  2. RUN sed -i s/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g /etc/apt/sources.list && \
  3. sed -i s/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g /etc/apt/sources.list
  4. RUN apt-get clean
  5. RUN apt-get update -y && \
  6. apt-get install -y \
  7. curl \
  8. git \
  9. make \
  10. automake \
  11. autoconf \
  12. tar \
  13. ca-certificates \
  14. build-essential \
  15. --no-install-recommends
  16. # prepare env
  17. ADD go-arm64.tgz /usr/local/
  18. ENV GOROOT /usr/local/go
  19. ENV GOPATH /go
  20. ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin
  21. ENV GO111MODULE on
  22. ENV GOPROXY https://goproxy.cn,direct
  23. # cross complie env
  24. RUN apt-get install -y \
  25. musl \
  26. musl-tools \
  27. --no-install-recommends && \
  28. mkdir -p $GOPATH/bin || true
  29. ENV GOOS linux
  30. ENV GOARCH arm64
  31. ENV CC /usr/bin/musl-gcc
  32. ENV LD /usr/bin/ld
  33. ENV AR /usr/bin/ar
  34. ENV CGO_ENABLED 1