github.com/gogf/gkafka@v1.0.1-0.20190702070843-033a14468069/third/golang.org/x/sys/unix/linux/Dockerfile (about)

     1  FROM ubuntu:18.10
     2  
     3  # Dependencies to get the git sources and go binaries
     4  RUN apt-get update && apt-get install -y  --no-install-recommends \
     5          ca-certificates \
     6          curl \
     7          git \
     8      && apt-get clean \
     9      && rm -rf /var/lib/apt/lists/*
    10  
    11  # Get the git sources. If not cached, this takes O(5 minutes).
    12  WORKDIR /git
    13  RUN git config --global advice.detachedHead false
    14  # Linux Kernel: Released 23 Dec 2018
    15  RUN git clone --branch v4.20 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
    16  # GNU C library: Released 01 Aug 2018 (we should try to get a secure way to clone this)
    17  RUN git clone --branch release/2.28/master --depth 1 git://sourceware.org/git/glibc.git
    18  
    19  # Get Go
    20  ENV GOLANG_VERSION 1.12beta1
    21  ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    22  ENV GOLANG_DOWNLOAD_SHA256 65bfd4a99925f1f85d712f4c1109977aa24ee4c6e198162bf8e819fdde19e875
    23  
    24  RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
    25      && echo "$GOLANG_DOWNLOAD_SHA256  golang.tar.gz" | sha256sum -c - \
    26      && tar -C /usr/local -xzf golang.tar.gz \
    27      && rm golang.tar.gz
    28  
    29  ENV PATH /usr/local/go/bin:$PATH
    30  
    31  # Linux and Glibc build dependencies and emulator
    32  RUN apt-get update && apt-get install -y  --no-install-recommends \
    33          bison gawk make python \
    34          gcc gcc-multilib \
    35          gettext texinfo \
    36          qemu-user \
    37      && apt-get clean \
    38      && rm -rf /var/lib/apt/lists/*
    39  # Cross compilers (install recommended packages to get cross libc-dev)
    40  RUN apt-get update && apt-get install -y \
    41          gcc-aarch64-linux-gnu       gcc-arm-linux-gnueabi     \
    42          gcc-mips-linux-gnu          gcc-mips64-linux-gnuabi64 \
    43          gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu      \
    44          gcc-powerpc64-linux-gnu     gcc-powerpc64le-linux-gnu \
    45  	gcc-riscv64-linux-gnu                                 \
    46          gcc-s390x-linux-gnu         gcc-sparc64-linux-gnu     \
    47      && apt-get clean \
    48      && rm -rf /var/lib/apt/lists/*
    49  
    50  # Let the scripts know they are in the docker environment
    51  ENV GOLANG_SYS_BUILD docker
    52  WORKDIR /build
    53  ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]