github.com/kooksee/kchain@v0.0.0-20180613035215-4aef51c04906/src/golang.org/x/sys/unix/linux/Dockerfile (about)

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