github.com/kobeld/docker@v1.12.0-rc1/Dockerfile.simple (about) 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 6 # This represents the bare minimum required to build and test Docker. 7 8 FROM debian:jessie 9 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 gcc \ 18 git \ 19 libapparmor-dev \ 20 libdevmapper-dev \ 21 libsqlite3-dev \ 22 \ 23 ca-certificates \ 24 e2fsprogs \ 25 iptables \ 26 procps \ 27 xfsprogs \ 28 xz-utils \ 29 \ 30 aufs-tools \ 31 && rm -rf /var/lib/apt/lists/* 32 33 # install seccomp: the version shipped in trusty is too old 34 ENV SECCOMP_VERSION 2.3.1 35 RUN set -x \ 36 && export SECCOMP_PATH="$(mktemp -d)" \ 37 && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \ 38 | tar -xzC "$SECCOMP_PATH" --strip-components=1 \ 39 && ( \ 40 cd "$SECCOMP_PATH" \ 41 && ./configure --prefix=/usr/local \ 42 && make \ 43 && make install \ 44 && ldconfig \ 45 ) \ 46 && rm -rf "$SECCOMP_PATH" 47 48 # Install Go 49 # IMPORTANT: If the version of Go is updated, the Windows to Linux CI machines 50 # will need updating, to avoid errors. Ping #docker-maintainers on IRC 51 # with a heads-up. 52 ENV GO_VERSION 1.6.2 53 RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \ 54 | tar -xzC /usr/local 55 ENV PATH /go/bin:/usr/local/go/bin:$PATH 56 ENV GOPATH /go:/go/src/github.com/docker/docker/vendor 57 ENV CGO_LDFLAGS -L/lib 58 59 # Install runc 60 ENV RUNC_COMMIT 5ce88a95f6cf218ba7f3309562f95464a968e890 61 RUN set -x \ 62 && export GOPATH="$(mktemp -d)" \ 63 && git clone https://github.com/crosbymichael/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ 64 && cd "$GOPATH/src/github.com/opencontainers/runc" \ 65 && git checkout -q "$RUNC_COMMIT" \ 66 && make static BUILDTAGS="seccomp apparmor selinux" \ 67 && cp runc /usr/local/bin/docker-runc \ 68 && rm -rf "$GOPATH" 69 70 # Install containerd 71 ENV CONTAINERD_COMMIT 860f3a94940894ac0a106eff4bd1616a67407ee2 72 RUN set -x \ 73 && export GOPATH="$(mktemp -d)" \ 74 && git clone https://github.com/docker/containerd.git "$GOPATH/src/github.com/docker/containerd" \ 75 && cd "$GOPATH/src/github.com/docker/containerd" \ 76 && git checkout -q "$CONTAINERD_COMMIT" \ 77 && make static \ 78 && cp bin/containerd /usr/local/bin/docker-containerd \ 79 && cp bin/containerd-shim /usr/local/bin/docker-containerd-shim \ 80 && cp bin/ctr /usr/local/bin/docker-containerd-ctr \ 81 && rm -rf "$GOPATH" 82 83 ENV AUTO_GOPATH 1 84 WORKDIR /usr/src/docker 85 COPY . /usr/src/docker