Browse code

Dockerfile.s390x: Add upstream libseccomp to compile runc

The runc compile currently fails on s390x:

Step 35 : RUN set -x && export GOPATH="$(mktemp -d)" && git clone
https://github.com/opencontainers/runc.git
"$GOPATH/src/github.com/opencontainers/runc" && cd
"$GOPATH/src/github.com/opencontainers/runc" && git checkout -q
"$RUNC_COMMIT" && make static BUILDTAGS="seccomp apparmor selinux" &&
cp runc /usr/local/bin/docker-runc

[snip]

# github.com/seccomp/libseccomp-golang
Godeps/_workspace/src/github.com/seccomp/libseccomp-golang/seccomp.go:25:22:
fatal error: seccomp.h: No such file or directory
// #include <seccomp.h>

The problem is that the installed libseccomp version in trusty is too old.

Fix this and install version 2.3.0 of libseccomp like it is done in the
x86 Dockerfile.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>

Michael Holzheu authored on 2016/04/09 02:03:53
Showing 1 changed files
... ...
@@ -48,6 +48,21 @@ RUN apt-get update && apt-get install -y \
48 48
 	tar \
49 49
 	--no-install-recommends
50 50
 
51
+# install seccomp: the version shipped in jessie is too old
52
+ENV SECCOMP_VERSION 2.3.0
53
+RUN set -x \
54
+	&& export SECCOMP_PATH="$(mktemp -d)" \
55
+	&& curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
56
+		| tar -xzC "$SECCOMP_PATH" --strip-components=1 \
57
+	&& ( \
58
+		cd "$SECCOMP_PATH" \
59
+		&& ./configure --prefix=/usr/local \
60
+		&& make \
61
+		&& make install \
62
+		&& ldconfig \
63
+	) \
64
+	&& rm -rf "$SECCOMP_PATH"
65
+
51 66
 # Get lvm2 source for compiling statically
52 67
 ENV LVM2_VERSION 2.02.103
53 68
 RUN mkdir -p /usr/local/lvm2 \