mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
Dockerfile: fix for seccomp
Commitf30244ee1bbroke the scenario of using Dockefile for anything but making a release. This happened because it installed native libseccomp build to a temporary directory, and so linking against libseccomp required setting a few environment variables. Let's fix this, and simplify libseccomp installation. Instead of using temporary directories, let's install native libseccomp to a specified directory, all the cross-builds to its subdirectories, and set PKG_CONFIG_PATH and LD_LIBRARY_PATH in Dockerfile so that the built library will found by pkg-config and the dynamic linker (without setting LD_LIBRARY_PATH, ld picks up distro-provided libseccomp.so). While at it, fix some bugs introduced by the abovementioned commit. This fixes building runc in make targets like shell, dbuild, integration, unittest -- i.e. those that depend on runcimage. Fixes:f30244ee1bSigned-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
+5
-2
@@ -53,7 +53,10 @@ RUN cd /tmp \
|
||||
# install libseccomp
|
||||
ARG LIBSECCOMP_VERSION
|
||||
COPY script/* /tmp/script/
|
||||
RUN mkdir -p /usr/local/src/libseccomp \
|
||||
&& /tmp/script/seccomp.sh "$LIBSECCOMP_VERSION" /usr/local/src/libseccomp /usr/local/src/libseccomp/.env-file arm64 armel armhf ppc64le
|
||||
RUN mkdir -p /opt/libseccomp \
|
||||
&& /tmp/script/seccomp.sh "$LIBSECCOMP_VERSION" /opt/libseccomp arm64 armel armhf ppc64le
|
||||
ENV LIBSECCOMP_VERSION=$LIBSECCOMP_VERSION
|
||||
ENV LD_LIBRARY_PATH=/opt/libseccomp/lib
|
||||
ENV PKG_CONFIG_PATH=/opt/libseccomp/lib/pkgconfig
|
||||
|
||||
WORKDIR /go/src/github.com/opencontainers/runc
|
||||
|
||||
Reference in New Issue
Block a user