2015-12-18 17:08:14 +00:00
|
|
|
FROM debian:jessie
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
make \
|
2016-03-24 02:22:36 +00:00
|
|
|
jq \
|
|
|
|
apparmor \
|
|
|
|
libapparmor-dev \
|
2015-12-18 17:08:14 +00:00
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install Go
|
2016-03-21 10:27:05 +00:00
|
|
|
ENV GO_VERSION 1.5.3
|
2015-12-18 17:08:14 +00:00
|
|
|
RUN curl -sSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar -v -C /usr/local -xz
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
2016-03-17 23:10:24 +00:00
|
|
|
ENV GOPATH /go:/go/src/github.com/docker/containerd/vendor
|
2015-12-18 17:08:14 +00:00
|
|
|
|
2016-03-24 02:22:36 +00:00
|
|
|
WORKDIR /go/src/github.com/docker/containerd
|
|
|
|
|
|
|
|
# install seccomp: the version shipped in trusty is too old
|
|
|
|
ENV SECCOMP_VERSION 2.3.0
|
|
|
|
RUN set -x \
|
|
|
|
&& export SECCOMP_PATH="$(mktemp -d)" \
|
|
|
|
&& curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
|
|
|
|
| tar -xzC "$SECCOMP_PATH" --strip-components=1 \
|
|
|
|
&& ( \
|
|
|
|
cd "$SECCOMP_PATH" \
|
|
|
|
&& ./configure --prefix=/usr/local \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& ldconfig \
|
|
|
|
) \
|
|
|
|
&& rm -rf "$SECCOMP_PATH"
|
|
|
|
|
|
|
|
# Install runc
|
2016-04-26 22:01:24 +00:00
|
|
|
ENV RUNC_COMMIT 9c89737e6e117a8be5a4980bc9795fe1a2b1028e
|
2016-03-24 02:22:36 +00:00
|
|
|
RUN set -x \
|
|
|
|
&& export GOPATH="$(mktemp -d)" \
|
|
|
|
&& git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
|
|
|
|
&& cd "$GOPATH/src/github.com/opencontainers/runc" \
|
|
|
|
&& git checkout -q "$RUNC_COMMIT" \
|
|
|
|
&& make BUILDTAGS="seccomp apparmor selinux" && make install
|
|
|
|
|
2015-12-18 17:08:14 +00:00
|
|
|
COPY . /go/src/github.com/docker/containerd
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/docker/containerd
|