summaryrefslogtreecommitdiff
path: root/test_docker.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test_docker.sh')
-rwxr-xr-xtest_docker.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/test_docker.sh b/test_docker.sh
index 59d6b7c..ad2bc5d 100755
--- a/test_docker.sh
+++ b/test_docker.sh
@@ -5,8 +5,14 @@
set -e
-NAME=`basename $1`
-TAG="python_magic/${NAME}:latest"
-docker build -t $TAG -f $1 .
-docker run $TAG
+DEFAULT_TARGETS="xenial bionic focal centos7 centos8 archlinux alpine"
+TARGETS=${1:-${DEFAULT_TARGETS}}
+
+HERE=`dirname $0`
+
+for i in $TARGETS; do
+ TAG="python_magic/${i}:latest"
+ docker build -t $TAG -f ${HERE}/test/docker/$i .
+ docker run $TAG
+done