Dockerfile.simple 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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
  5. # This represents the bare minimum required to build and test Docker.
  6. FROM debian:stretch
  7. # allow replacing httpredir or deb mirror
  8. ARG APT_MIRROR=deb.debian.org
  9. RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
  10. # Compile and runtime deps
  11. # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies
  12. # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
  13. RUN apt-get update && apt-get install -y --no-install-recommends \
  14. btrfs-tools \
  15. build-essential \
  16. curl \
  17. cmake \
  18. gcc \
  19. git \
  20. libapparmor-dev \
  21. libdevmapper-dev \
  22. libseccomp-dev \
  23. ca-certificates \
  24. e2fsprogs \
  25. iptables \
  26. pkg-config \
  27. procps \
  28. xfsprogs \
  29. xz-utils \
  30. \
  31. aufs-tools \
  32. vim-common \
  33. && rm -rf /var/lib/apt/lists/*
  34. # Install Go
  35. # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines
  36. # will need updating, to avoid errors. Ping #docker-maintainers on IRC
  37. # with a heads-up.
  38. # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored
  39. ENV GO_VERSION 1.9.2
  40. RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
  41. | tar -xzC /usr/local
  42. ENV PATH /go/bin:/usr/local/go/bin:$PATH
  43. ENV GOPATH /go
  44. ENV CGO_LDFLAGS -L/lib
  45. # Install runc, containerd, tini and docker-proxy
  46. # Please edit hack/dockerfile/install-binaries.sh to update them.
  47. COPY hack/dockerfile/binaries-commits /tmp/binaries-commits
  48. COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
  49. RUN /tmp/install-binaries.sh runc containerd tini proxy dockercli
  50. ENV PATH=/usr/local/cli:$PATH
  51. ENV AUTO_GOPATH 1
  52. WORKDIR /usr/src/docker
  53. COPY . /usr/src/docker