1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/make/.ensure-userns-test
Jessica Frazelle a48fe62384
add default seccomp profile tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-28 10:26:48 -08:00

18 lines
431 B
Bash

#!/bin/bash
set -e
# Build a C binary for cloning a userns for seccomp tests
# and compile it for target daemon
dir="$DEST/userns-test"
mkdir -p "$dir"
(
GOOS=${DOCKER_ENGINE_GOOS:="linux"}
if [ "$GOOS" = "linux" ]; then
cd "$dir"
gcc -g -Wall -static ../../../../contrib/userns-test/main.c -o ./userns-test
cp ../../../../contrib/userns-test/Dockerfile .
docker build -qt userns-test . > /dev/null
fi
)
rm -rf "$dir"