Rework docker setup

This commit is contained in:
eikek
2021-05-31 00:07:11 +02:00
parent c0402b1f92
commit b122d9eab0
8 changed files with 326 additions and 0 deletions

34
docker/dockerfiles/build.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Please specify a version"
exit 1
fi
version="$1"
if [[ $version == v* ]]; then
version="${version:1}"
fi
cd "$(dirname "$0")"
echo "============ Building Tools ============"
docker build \
--build-arg version=$version \
--tag docspell/tools:v$version \
--tag docspell/tools:latest \
-f tools.dockerfile .
echo "============ Building Restserver ============"
docker build \
--build-arg version=$version \
--tag docspell/restserver:v$version \
--tag docspell/restserver:latest \
-f restserver.dockerfile .
echo "============ Building Joex ============"
docker build \
--build-arg version=$version \
--tag docspell/joex:v$version \
--tag docspell/joex:latest \
-f joex.dockerfile .