1234567891011121314151617181920212223242526272829303132333435363738 |
- FROM debian:buster
- RUN apt-get update -y && \
- apt-get install -y \
- curl \
- git \
- make \
- automake \
- autoconf \
- tar \
- ca-certificates \
- build-essential \
- --no-install-recommends
- # prepare env
- RUN curl -o /tmp/go.tgz https://go.dev/dl/go1.18.linux-amd64.tar.gz && \
- tar zxf /tmp/go.tgz -C /usr/local/ && rm -f /tmp/go.tgz
- 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 \
- gcc-mips64el-linux-gnuabi64 \
- g++-mips64el-linux-gnuabi64 \
- --no-install-recommends && \
- mkdir -p $GOPATH/bin || true
- ENV GOOS linux
- ENV GOARCH mips64le
- ENV CC /usr/bin/mips64el-linux-gnuabi64-gcc
- ENV LD /usr/bin/mips64el-linux-gnuabi64-ld
- ENV AR /usr/bin/mips64el-linux-gnuabi64-ar
- ENV CGO_ENABLED 1
|