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-powerpc64le-linux-gnu \
- g++-powerpc64le-linux-gnu \
- --no-install-recommends && \
- mkdir -p $GOPATH/bin || true
- ENV GOOS linux
- ENV GOARCH ppc64le
- ENV CC /usr/bin/powerpc64le-linux-gnu-gcc
- ENV LD /usr/bin/powerpc64le-linux-gnu-ld
- ENV AR /usr/bin/powerpc64le-linux-gnu-ar
- ENV CGO_ENABLED 1
|