Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM debian:jessie
  2. RUN apt-get update && apt-get install -y \
  3. build-essential \
  4. ca-certificates \
  5. curl \
  6. git \
  7. make \
  8. jq \
  9. apparmor \
  10. libapparmor-dev \
  11. --no-install-recommends \
  12. && rm -rf /var/lib/apt/lists/*
  13. # Install Go
  14. ENV GO_VERSION 1.5.3
  15. RUN curl -sSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar -v -C /usr/local -xz
  16. ENV PATH /go/bin:/usr/local/go/bin:$PATH
  17. ENV GOPATH /go:/go/src/github.com/docker/containerd/vendor
  18. WORKDIR /go/src/github.com/docker/containerd
  19. # install seccomp: the version shipped in trusty is too old
  20. ENV SECCOMP_VERSION 2.3.0
  21. RUN set -x \
  22. && export SECCOMP_PATH="$(mktemp -d)" \
  23. && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
  24. | tar -xzC "$SECCOMP_PATH" --strip-components=1 \
  25. && ( \
  26. cd "$SECCOMP_PATH" \
  27. && ./configure --prefix=/usr/local \
  28. && make \
  29. && make install \
  30. && ldconfig \
  31. ) \
  32. && rm -rf "$SECCOMP_PATH"
  33. # Install runc
  34. ENV RUNC_COMMIT d49ece5a83da3dcb820121d6850e2b61bd0a5fbe
  35. RUN set -x \
  36. && export GOPATH="$(mktemp -d)" \
  37. && git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
  38. && cd "$GOPATH/src/github.com/opencontainers/runc" \
  39. && git checkout -q "$RUNC_COMMIT" \
  40. && make BUILDTAGS="seccomp apparmor selinux" && make install
  41. COPY . /go/src/github.com/docker/containerd
  42. WORKDIR /go/src/github.com/docker/containerd
  43. RUN make all install