gitee.com/johng/gf@v1.4.7/third/golang.org/x/sys/unix/linux/Dockerfile (about)

     1  FROM ubuntu:17.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 01 Apr 2018
    15  RUN git clone --branch v4.16 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
    16  # GNU C library: Released 01 Feb 2018 (we should try to get a secure way to clone this)
    17  RUN git clone --branch glibc-2.27 --depth 1 git://sourceware.org/git/glibc.git
    18  
    19  # Get Go
    20  ENV GOLANG_VERSION 1.10.1
    21  ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
    22  ENV GOLANG_DOWNLOAD_SHA256 72d820dec546752e5a8303b33b009079c15c2390ce76d67cf514991646c6127b
    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 \
    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-s390x-linux-gnu         gcc-sparc64-linux-gnu     \
    46      && apt-get clean \
    47      && rm -rf /var/lib/apt/lists/*
    48  
    49  # Let the scripts know they are in the docker environment
    50  ENV GOLANG_SYS_BUILD docker
    51  WORKDIR /build
    52  ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]