mdtest/testing/docker/prepare.sh

20 lines
399 B
Bash
Executable File

#!/bin/bash
echo "Checking docker"
docker ps
if [ $? != 0 ] ; then
echo "Error, cannot run docker commands"
groups |grep docker || echo "You are not in the docker group !"
exit 1
fi
echo "Building docker containers"
for IMAGE in $(find -type d | cut -b 3- |grep -v "^$") ; do
docker build -t hpc/ior:$IMAGE $IMAGE
if [ $? != 0 ] ; then
echo "Error building image $IMAGE"
exit 1
fi
done