Browse code

ppc64le: build seccomp in dockerfile

This pr adds in building seccomp to ppc64le.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

Christopher Jones authored on 2016/05/06 01:26:23
Showing 1 changed files
... ...
@@ -71,6 +71,22 @@ RUN cd /usr/local/lvm2 \
71 71
 	&& make install_device-mapper
72 72
 # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
73 73
 
74
+# install seccomp: the version shipped in jessie is too old
75
+ENV SECCOMP_VERSION 2.3.0
76
+RUN set -x \
77
+        && export SECCOMP_PATH="$(mktemp -d)" \
78
+        && curl -fsSL "https://github.com/seccomp/libseccomp/releases/download/v${SECCOMP_VERSION}/libseccomp-${SECCOMP_VERSION}.tar.gz" \
79
+                | tar -xzC "$SECCOMP_PATH" --strip-components=1 \
80
+        && ( \
81
+                cd "$SECCOMP_PATH" \
82
+                && ./configure --prefix=/usr/local \
83
+                && make \
84
+                && make install \
85
+                && ldconfig \
86
+        ) \
87
+        && rm -rf "$SECCOMP_PATH"
88
+
89
+
74 90
 ## BUILD GOLANG 1.6
75 91
 # NOTE: ppc64le has compatibility issues with older versions of go, so make sure the version >= 1.6
76 92
 ENV GO_VERSION 1.6.2
... ...
@@ -152,7 +168,7 @@ RUN useradd --create-home --gid docker unprivilegeduser
152 152
 
153 153
 VOLUME /var/lib/docker
154 154
 WORKDIR /go/src/github.com/docker/docker
155
-ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux
155
+ENV DOCKER_BUILDTAGS apparmor pkcs11 seccomp selinux
156 156
 
157 157
 # Let us use a .bashrc file
158 158
 RUN ln -sfv $PWD/.bashrc ~/.bashrc
... ...
@@ -194,7 +210,7 @@ RUN set -x \
194 194
 	&& git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
195 195
 	&& cd "$GOPATH/src/github.com/opencontainers/runc" \
196 196
 	&& git checkout -q "$RUNC_COMMIT" \
197
-	&& make static BUILDTAGS="apparmor selinux" \
197
+	&& make static BUILDTAGS="apparmor seccomp selinux" \
198 198
 	&& cp runc /usr/local/bin/docker-runc \
199 199
 	&& rm -rf "$GOPATH"
200 200