You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.0 KiB

  1. FROM ubuntu:16.04
  2. # Use the most recent ubuntu sources
  3. RUN echo 'deb http://en.archive.ubuntu.com/ubuntu/ artful main universe' >> /etc/apt/sources.list
  4. # Dependencies to get the git sources and go binaries
  5. RUN apt-get update && apt-get install -y \
  6. curl \
  7. git \
  8. && rm -rf /var/lib/apt/lists/*
  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 03 Sep 2017
  13. RUN git clone --branch v4.13 --depth 1 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
  14. # GNU C library: Released 02 Aug 2017 (we should try to get a secure way to clone this)
  15. RUN git clone --branch glibc-2.26 --depth 1 git://sourceware.org/git/glibc.git
  16. # Get Go 1.9.2
  17. ENV GOLANG_VERSION 1.9.2
  18. ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
  19. ENV GOLANG_DOWNLOAD_SHA256 de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b
  20. RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
  21. && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
  22. && tar -C /usr/local -xzf golang.tar.gz \
  23. && rm golang.tar.gz
  24. ENV PATH /usr/local/go/bin:$PATH
  25. # Linux and Glibc build dependencies
  26. RUN apt-get update && apt-get install -y \
  27. gawk make python \
  28. gcc gcc-multilib \
  29. gettext texinfo \
  30. && rm -rf /var/lib/apt/lists/*
  31. # Emulator and cross compilers
  32. RUN apt-get update && apt-get install -y \
  33. qemu \
  34. gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi \
  35. gcc-mips-linux-gnu gcc-mips64-linux-gnuabi64 \
  36. gcc-mips64el-linux-gnuabi64 gcc-mipsel-linux-gnu \
  37. gcc-powerpc64-linux-gnu gcc-powerpc64le-linux-gnu \
  38. gcc-s390x-linux-gnu gcc-sparc64-linux-gnu \
  39. && rm -rf /var/lib/apt/lists/*
  40. # Let the scripts know they are in the docker environment
  41. ENV GOLANG_SYS_BUILD docker
  42. WORKDIR /build
  43. ENTRYPOINT ["go", "run", "linux/mkall.go", "/git/linux", "/git/glibc"]