2018-11-08 10:56:11 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-10-13 22:46:20 +02:00
|
|
|
if [[ -z $1 ]] && [[ -z $2 ]]; then
|
2018-11-08 10:56:11 +01:00
|
|
|
echo "Please provide a container image name and version" 1>&2
|
|
|
|
exit 1
|
2020-10-13 22:46:20 +02:00
|
|
|
elif [[ $1 ]] && [[ -z $2 ]]; then
|
|
|
|
echo "Building 'photoprism/$1:latest'...";
|
|
|
|
docker build --no-cache --build-arg BUILD_TAG=$2 -t photoprism/$1:latest -f docker/${1/-//}/Dockerfile .
|
|
|
|
echo "Done"
|
2018-11-08 10:56:11 +01:00
|
|
|
else
|
|
|
|
echo "Building 'photoprism/$1:$2'...";
|
2020-04-28 11:51:42 +02:00
|
|
|
docker build --no-cache --build-arg BUILD_TAG=$2 -t photoprism/$1:latest -t photoprism/$1:$2 -f docker/${1/-//}/Dockerfile .
|
2018-11-08 10:56:11 +01:00
|
|
|
echo "Done"
|
2019-05-16 08:41:16 +02:00
|
|
|
fi
|