github.com/dolotech/hongbao@v0.0.0-20191130105438-fd59d7a5dda5/src/golang.org/x/sys/unix/linux/Dockerfile (about) 1 FROM ubuntu:16.04 2 3 # Use the most recent ubuntu sources 4 RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list 5 6 # Dependencies to get the git sources and go binaries 7 RUN apt-get update && apt-get install -y \ 8 curl \ 9 git \ 10 && rm -rf /var/lib/apt/lists/* 11 12 # Get the git sources. If not cached, this takes O(5 minutes). 13 WORKDIR /git 14 RUN git config --global advice.detachedHead false 15 # Linux Kernel: Released 03 Sep 2017 16 RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux 17 # GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this) 18 RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git 19 20 # Get Go 1.8 (https://github.com/docker-library/golang/blob/master/1.8/Dockerfile) 21 ENV GOLANG_VERSION 1.8 22 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz 23 ENV GOLANG_DOWNLOAD_SHA256 53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca 24 25 RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ 26 && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ 27 && tar -C /usr/local -xzf golang.tar.gz \ 28 && rm golang.tar.gz 29 30 ENV PATH /usr/local/go/bin:$PATH 31 32 # Linux and Glibc build dependencies 33 RUN apt-get update && apt-get install -y \ 34 gawk make python \ 35 gcc gcc-multilib \ 36 gettext texinfo \ 37 && rm -rf /var/lib/apt/lists/* 38 # Emulator and cross compilers 39 RUN apt-get update && apt-get install -y \ 40 qemu \ 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 && rm -rf /var/lib/apt/lists/* 47 48 # Let the scripts know they are in the docker environment 49 ENV GOLANG_SYS_BUILD docker 50 WORKDIR /build 51 ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]