Dockerfile.build.mips64el 872 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM debian:buster
  2. RUN apt-get update -y && \
  3. apt-get install -y \
  4. curl \
  5. git \
  6. make \
  7. automake \
  8. autoconf \
  9. tar \
  10. ca-certificates \
  11. build-essential \
  12. --no-install-recommends
  13. # prepare env
  14. RUN curl -o /tmp/go.tgz https://go.dev/dl/go1.18.linux-amd64.tar.gz && \
  15. tar zxf /tmp/go.tgz -C /usr/local/ && rm -f /tmp/go.tgz
  16. ENV GOROOT /usr/local/go
  17. ENV GOPATH /go
  18. ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin
  19. ENV GO111MODULE on
  20. ENV GOPROXY https://goproxy.cn,direct
  21. # cross complie env
  22. RUN apt-get install -y \
  23. gcc-mips64el-linux-gnuabi64 \
  24. g++-mips64el-linux-gnuabi64 \
  25. --no-install-recommends && \
  26. mkdir -p $GOPATH/bin || true
  27. ENV GOOS linux
  28. ENV GOARCH mips64le
  29. ENV CC /usr/bin/mips64el-linux-gnuabi64-gcc
  30. ENV LD /usr/bin/mips64el-linux-gnuabi64-ld
  31. ENV AR /usr/bin/mips64el-linux-gnuabi64-ar
  32. ENV CGO_ENABLED 1