summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-04-29 22:04:23 (GMT)
committerGitHub <noreply@github.com>2018-04-29 22:04:23 (GMT)
commit5c24106d3b6ddb5229874a74e3cfe0059fa8ce8d (patch)
tree6ae4685ef53ec2b10593fe19fc1397bc8619f311 /testing
parent51f0e7c649a84c66ce0111703498dc4466e35562 (diff)
parent74979fb19b2c7220dab4196c0d34e0c29b341b09 (diff)
Merge pull request #953 from stilor/docker-testing2
Docker configuration for Gentoo + a bunch of fixes
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/docker/common-scripts/su-as-user1
-rwxr-xr-xtesting/docker/dmgr.sh10
-rw-r--r--testing/docker/gentoo-amd64/Dockerfile4
3 files changed, 13 insertions, 2 deletions
diff --git a/testing/docker/common-scripts/su-as-user b/testing/docker/common-scripts/su-as-user
index 99246f2..436eb54 100755
--- a/testing/docker/common-scripts/su-as-user
+++ b/testing/docker/common-scripts/su-as-user
@@ -8,6 +8,7 @@ shift 4
groupadd -g ${gid} ${grp}
useradd -d /home/${usr} -m -g ${gid} -u ${uid} ${usr}
+rm -f /home/${usr}/src
ln -sf /src /home/${usr}/src
if [ -z "$*" ]; then
exec su -l ${usr}
diff --git a/testing/docker/dmgr.sh b/testing/docker/dmgr.sh
index 5dbb8b2..1f2b120 100755
--- a/testing/docker/dmgr.sh
+++ b/testing/docker/dmgr.sh
@@ -24,6 +24,9 @@ ${1:+ERROR :: $1
Action is one of:
build Build or rebuild the specified containers.
+ test Run tests (build-all).
+ enter Spawn a shell in the specified container.
+ clean Clean up in the specified container.
If containers are not specified, the action is applied to all available containers.
EOF
@@ -83,7 +86,10 @@ action_clean()
local cntr=$1
msg "Cleaning up after ${cntr}"
- rm -rf build-${cntr}
+ if [ -d build-${cntr} ]; then
+ chmod -R +w build-${cntr}
+ rm -rf build-${cntr}
+ fi
}
action=$1
@@ -94,7 +100,7 @@ selected_containers="${*:-${all_containers}}"
case "${action}" in
build|test|enter|clean)
for c in ${selected_containers}; do
- eval "action_${action} $c"
+ eval "action_${action} ${c}"
done
;;
"")
diff --git a/testing/docker/gentoo-amd64/Dockerfile b/testing/docker/gentoo-amd64/Dockerfile
new file mode 100644
index 0000000..6500564
--- /dev/null
+++ b/testing/docker/gentoo-amd64/Dockerfile
@@ -0,0 +1,4 @@
+FROM gentoo/stage3-amd64-hardened
+RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
+RUN chmod +x /sbin/dumb-init
+ENTRYPOINT [ "/sbin/dumb-init", "--" ]