#!/bin/bash
# Build a docker image from a file or several fragments

mkdir -p dockertest
# Make an empty file
echo "" > dockertest/Dockerfile

for var in "$@"
do
	echo "Adding $var to recipe"
	cat "$var" >> dockertest/Dockerfile
done

docker build dockertest -t research-stacks/dockertest



#!/bin/bash
# Build a docker image from a file or several fragments
# Pass docker image name followed by Dockerfile or ordered fragments
mkdir -p $1
# Make an empty file
echo "" > $1/Dockerfile

for var in "$@"
do
	if [ "$1" != "$var" ]
	then
		echo "Adding $var to recipe"
		cat "$var" >> ${1}/Dockerfile
	fi
done

docker build $1 -t research-stacks/$1



Allow test image name to be specified
Allow test image name to be specified
