github.com/alexis81/domosgo@v0.0.0-20191016125037-5aee90a434af/Domos/src/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 \ 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 28 Jan 2018 13 RUN git clone --branch v4.15 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux 14 # GNU C library: Released 01 Feb 2018 (we should try to get a secure way to clone this) 15 RUN git clone --branch glibc-2.27 --depth 1 git://sourceware.org/git/glibc.git 16 17 # Get Go 1.10 18 ENV GOLANG_VERSION 1.10 19 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz 20 ENV GOLANG_DOWNLOAD_SHA256 b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 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 bison 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"]