mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-06-09 14:49:53 +02:00
🐛 Fix building from multiple Dockerfiles
This did not work: ./build Dockerfile-core* Fix this by properly handling multiple given Dockerfiles, i.e. removing the "Dockerfile-" prefix for all arguments. Fixes gh-61.
This commit is contained in:
parent
7f167ffa6a
commit
6ff314ffb0
1 changed files with 19 additions and 6 deletions
25
build
25
build
|
@ -4,6 +4,25 @@ set -e
|
|||
self=`realpath $0`
|
||||
self_dir=`dirname "$self"`
|
||||
|
||||
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
sub_images=""
|
||||
for arg in "$@"; do
|
||||
arg_sub_image=`echo "$arg" | sed 's/Dockerfile-//'`
|
||||
NL=$'\n'
|
||||
sub_images+="$NL$arg_sub_image"
|
||||
done
|
||||
else
|
||||
sub_images=`ls -1 Dockerfile-core* | sed 's/Dockerfile-//'`
|
||||
sub_images="$sub_images `ls -1 Dockerfile-* | sed 's/Dockerfile-//'`"
|
||||
fi
|
||||
echo "Building:"
|
||||
echo "$sub_images"
|
||||
echo
|
||||
|
||||
|
||||
|
||||
DATA_SUBDIR=data
|
||||
get_from_annex() {
|
||||
annex_get 'calamari-models/GT4HistOCR/2019-07-22T15_49+0200/*.ckpt*'
|
||||
|
@ -29,12 +48,6 @@ get_from_web() {
|
|||
handle_data
|
||||
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
sub_images=`echo "$@" | sed 's/Dockerfile-//'`
|
||||
else
|
||||
sub_images=`ls -1 Dockerfile-core* | sed 's/Dockerfile-//'`
|
||||
sub_images="$sub_images `ls -1 Dockerfile-* | sed 's/Dockerfile-//'`"
|
||||
fi
|
||||
|
||||
# Update base images if we build a core image
|
||||
if echo "$sub_images" | grep -q core; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue