github.com/docker/containerd@v0.2.9-0.20170509230648-8ef7df579710/Dockerfile (about) 1 FROM debian:jessie 2 3 # allow replacing httpredir mirror 4 ARG APT_MIRROR=httpredir.debian.org 5 RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list 6 7 RUN apt-get update && apt-get install -y \ 8 build-essential \ 9 ca-certificates \ 10 curl \ 11 make \ 12 jq \ 13 pkg-config \ 14 apparmor \ 15 libapparmor-dev \ 16 --no-install-recommends \ 17 && rm -rf /var/lib/apt/lists/* 18 19 # add git repo 20 RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24 21 RUN echo deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main > /etc/apt/sources.list.d/git.list 22 23 RUN apt-get update && apt-get install -y git 24 # Install Go 25 ENV GO_VERSION 1.8.1 26 RUN curl -sSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar -v -C /usr/local -xz 27 ENV PATH /go/bin:/usr/local/go/bin:$PATH 28 ENV GOPATH /go:/go/src/github.com/containerd/containerd/vendor 29 30 ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 31 # Grab Go's cover tool for dead-simple code coverage testing 32 # Grab Go's vet tool for examining go code to find suspicious constructs 33 # and help prevent errors that the compiler might not catch 34 RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ 35 && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \ 36 && go install -v golang.org/x/tools/cmd/cover \ 37 && go install -v golang.org/x/tools/cmd/vet 38 # Grab Go's lint tool 39 ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 40 RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ 41 && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ 42 && go install -v github.com/golang/lint/golint 43 44 WORKDIR /go/src/github.com/containerd/containerd 45 46 # install seccomp: the version shipped in trusty is too old 47 ENV SECCOMP_VERSION 2.3.1 48 RUN set -x \ 49 && export SECCOMP_PATH="$(mktemp -d)" \ 50 && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \ 51 | tar -xzC "$SECCOMP_PATH" --strip-components=1 \ 52 && ( \ 53 cd "$SECCOMP_PATH" \ 54 && ./configure --prefix=/usr/local \ 55 && make \ 56 && make install \ 57 && ldconfig \ 58 ) \ 59 && rm -rf "$SECCOMP_PATH" 60 61 # Install runc 62 ENV RUNC_COMMIT 992a5be178a62e026f4069f443c6164912adbf09 63 RUN set -x \ 64 && export GOPATH="$(mktemp -d)" \ 65 && git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ 66 && cd "$GOPATH/src/github.com/opencontainers/runc" \ 67 && git checkout -q "$RUNC_COMMIT" \ 68 && make BUILDTAGS="seccomp apparmor selinux" && make install 69 70 COPY . /go/src/github.com/containerd/containerd 71 72 WORKDIR /go/src/github.com/containerd/containerd 73 74 RUN make all install