github.com/runcom/containerd@v0.0.0-20160708090337-9bff9f934c0d/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  	git \
    12  	make \
    13  	jq \
    14  	pkg-config \
    15  	apparmor \
    16  	libapparmor-dev \
    17  	--no-install-recommends \
    18  	&& rm -rf /var/lib/apt/lists/*
    19  
    20  # Install Go
    21  ENV GO_VERSION 1.6.2
    22  RUN curl -sSL  "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar -v -C /usr/local -xz
    23  ENV PATH /go/bin:/usr/local/go/bin:$PATH
    24  ENV GOPATH /go:/go/src/github.com/docker/containerd/vendor
    25  
    26  ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3
    27  # Grab Go's cover tool for dead-simple code coverage testing
    28  # Grab Go's vet tool for examining go code to find suspicious constructs
    29  # and help prevent errors that the compiler might not catch
    30  RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \
    31  	&& (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) \
    32  	&& go install -v golang.org/x/tools/cmd/cover \
    33  	&& go install -v golang.org/x/tools/cmd/vet
    34  # Grab Go's lint tool
    35  ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456
    36  RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \
    37  	&& (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \
    38  	&& go install -v github.com/golang/lint/golint
    39  
    40  WORKDIR /go/src/github.com/docker/containerd
    41  
    42  # install seccomp: the version shipped in trusty is too old
    43  ENV SECCOMP_VERSION 2.3.0
    44  RUN set -x \
    45  	&& export SECCOMP_PATH="$(mktemp -d)" \
    46  	&& curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
    47  		| tar -xzC "$SECCOMP_PATH" --strip-components=1 \
    48  	&& ( \
    49  		cd "$SECCOMP_PATH" \
    50  		&& ./configure --prefix=/usr/local \
    51  		&& make \
    52  		&& make install \
    53  		&& ldconfig \
    54  	) \
    55  	&& rm -rf "$SECCOMP_PATH"
    56  
    57  # Install runc
    58  ENV RUNC_COMMIT cc29e3dded8e27ba8f65738f40d251c885030a28
    59  RUN set -x \
    60  	&& export GOPATH="$(mktemp -d)" \
    61      && git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
    62  	&& cd "$GOPATH/src/github.com/opencontainers/runc" \
    63  	&& git checkout -q "$RUNC_COMMIT" \
    64  	&& make BUILDTAGS="seccomp apparmor selinux" && make install
    65  
    66  COPY . /go/src/github.com/docker/containerd
    67  
    68  WORKDIR /go/src/github.com/docker/containerd
    69  
    70  RUN make all install