Dockerfile.simple 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # docker build -t docker:simple -f Dockerfile.simple .
  2. # docker run --rm docker:simple hack/make.sh dynbinary
  3. # docker run --rm --privileged docker:simple hack/dind hack/make.sh test-unit
  4. # docker run --rm --privileged -v /var/lib/docker docker:simple hack/dind hack/make.sh dynbinary test-integration-cli
  5. # This represents the bare minimum required to build and test Docker.
  6. FROM debian:jessie
  7. # compile and runtime deps
  8. # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
  9. # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
  10. RUN apt-get update && apt-get install -y --no-install-recommends \
  11. btrfs-tools \
  12. build-essential \
  13. curl \
  14. gcc \
  15. git \
  16. libapparmor-dev \
  17. libdevmapper-dev \
  18. libsqlite3-dev \
  19. \
  20. ca-certificates \
  21. e2fsprogs \
  22. iptables \
  23. procps \
  24. xfsprogs \
  25. xz-utils \
  26. \
  27. aufs-tools \
  28. && rm -rf /var/lib/apt/lists/*
  29. # install seccomp: the version shipped in trusty is too old
  30. ENV SECCOMP_VERSION 2.3.1
  31. RUN set -x \
  32. && export SECCOMP_PATH="$(mktemp -d)" \
  33. && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
  34. | tar -xzC "$SECCOMP_PATH" --strip-components=1 \
  35. && ( \
  36. cd "$SECCOMP_PATH" \
  37. && ./configure --prefix=/usr/local \
  38. && make \
  39. && make install \
  40. && ldconfig \
  41. ) \
  42. && rm -rf "$SECCOMP_PATH"
  43. # Install Go
  44. # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
  45. # will need updating, to avoid errors. Ping #docker-maintainers on IRC
  46. # with a heads-up.
  47. ENV GO_VERSION 1.6.3
  48. RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \
  49. | tar -xzC /usr/local
  50. ENV PATH /go/bin:/usr/local/go/bin:$PATH
  51. ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
  52. ENV CGO_LDFLAGS -L/lib
  53. # Install runc
  54. ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28
  55. RUN set -x \
  56. && export GOPATH="$(mktemp -d)" \
  57. && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
  58. && cd "$GOPATH/src/github.com/opencontainers/runc" \
  59. && git checkout -q "$RUNC_COMMIT" \
  60. && make static BUILDTAGS="seccomp apparmor selinux" \
  61. && cp runc /usr/local/bin/docker-runc \
  62. && rm -rf "$GOPATH"
  63. # Install containerd
  64. ENV CONTAINERD_COMMIT 0ac3cd1be170d180b2baed755e8f0da547ceb267
  65. RUN set -x \
  66. && export GOPATH="$(mktemp -d)" \
  67. && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \
  68. && cd "$GOPATH/src/github.com/docker/containerd" \
  69. && git checkout -q "$CONTAINERD_COMMIT" \
  70. && make static \
  71. && cp bin/containerd /usr/local/bin/docker-containerd \
  72. && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \
  73. && cp bin/ctr /usr/local/bin/docker-containerd-ctr \
  74. && rm -rf "$GOPATH"
  75. ENV AUTO_GOPATH 1
  76. WORKDIR /usr/src/docker
  77. COPY . /usr/src/docker