Dockerfile.gccgo 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # This file describes the standard way to build Docker, using docker
  2. #
  3. # Usage:
  4. #
  5. # # Assemble the full dev environment. This is slow the first time.
  6. # docker build -t docker -f Dockerfile.gccgo .
  7. #
  8. FROM gcc:6.1
  9. # Packaged dependencies
  10. RUN apt-get update && apt-get install -y \
  11. apparmor \
  12. aufs-tools \
  13. btrfs-tools \
  14. build-essential \
  15. curl \
  16. git \
  17. iptables \
  18. jq \
  19. net-tools \
  20. libapparmor-dev \
  21. libcap-dev \
  22. libsqlite3-dev \
  23. mercurial \
  24. net-tools \
  25. parallel \
  26. python-dev \
  27. python-mock \
  28. python-pip \
  29. python-websocket \
  30. --no-install-recommends
  31. # Get lvm2 source for compiling statically
  32. RUN git clone -b v2_02_103 https://git.fedorahosted.org/git/lvm2.git /usr/local/lvm2
  33. # see https://git.fedorahosted.org/cgit/lvm2.git/refs/tags for release tags
  34. # Compile and install lvm2
  35. RUN cd /usr/local/lvm2 \
  36. && ./configure --enable-static_link \
  37. && make device-mapper \
  38. && make install_device-mapper
  39. # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
  40. # install seccomp: the version shipped in jessie is too old
  41. ENV SECCOMP_VERSION v2.3.1
  42. RUN set -x \
  43. && export SECCOMP_PATH=$(mktemp -d) \
  44. && git clone https://github.com/seccomp/libseccomp.git "$SECCOMP_PATH" \
  45. && ( \
  46. cd "$SECCOMP_PATH" \
  47. && git checkout "$SECCOMP_VERSION" \
  48. && ./autogen.sh \
  49. && ./configure --prefix=/usr \
  50. && make \
  51. && make install \
  52. ) \
  53. && rm -rf "$SECCOMP_PATH"
  54. ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
  55. # Get the "docker-py" source so we can run their integration tests
  56. ENV DOCKER_PY_COMMIT 7befe694bd21e3c54bb1d7825270ea4bd6864c13
  57. RUN git clone https://github.com/docker/docker-py.git /docker-py \
  58. && cd /docker-py \
  59. && git checkout -q $DOCKER_PY_COMMIT
  60. # Add an unprivileged user to be used for tests which need it
  61. RUN groupadd -r docker
  62. RUN useradd --create-home --gid docker unprivilegeduser
  63. VOLUME /var/lib/docker
  64. WORKDIR /go/src/github.com/docker/docker
  65. ENV DOCKER_BUILDTAGS apparmor seccomp selinux
  66. # Install runc
  67. ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28
  68. RUN set -x \
  69. && export GOPATH="$(mktemp -d)" \
  70. && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
  71. && cd "$GOPATH/src/github.com/opencontainers/runc" \
  72. && git checkout -q "$RUNC_COMMIT" \
  73. && make static BUILDTAGS="seccomp apparmor selinux" \
  74. && cp runc /usr/local/bin/docker-runc \
  75. && rm -rf "$GOPATH"
  76. # Install containerd
  77. ENV CONTAINERD_COMMIT 0ac3cd1be170d180b2baed755e8f0da547ceb267
  78. RUN set -x \
  79. && export GOPATH="$(mktemp -d)" \
  80. && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
  81. && cd "$GOPATH/src/github.com/docker/containerd" \
  82. && git checkout -q "$CONTAINERD_COMMIT" \
  83. && make static \
  84. && cp bin/containerd /usr/local/bin/docker-containerd \
  85. && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
  86. && cp bin/ctr /usr/local/bin/docker-containerd-ctr \
  87. && rm -rf "$GOPATH"
  88. # Wrap all commands in the "docker-in-docker" script to allow nested containers
  89. ENTRYPOINT ["hack/dind"]
  90. # Upload docker source
  91. COPY . /go/src/github.com/docker/docker