Allow (re)building only some container images

To speed up rebuilding container images, you can now supply the desired
subimage to build:

  ./build sbb_textline_detector

or even simpler, leveraging shell filename completion:

  ./build Dockerfile-sbb_textline_detector
master
Gerber, Mike 4 years ago
parent 96285f3300
commit 68f6e1609b

@ -26,8 +26,12 @@ get_from_web() {
. $self_dir/qurator_data_lib.sh . $self_dir/qurator_data_lib.sh
handle_data handle_data
sub_images=`ls -1 Dockerfile-core* | sed 's/Dockerfile-//'` if [ -n "$1" ]; then
sub_images="$sub_images `ls -1 Dockerfile-* | sed 's/Dockerfile-//'`" 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
for sub_image in $sub_images; do for sub_image in $sub_images; do
docker build --cache-from=my_ocrd_workflow-$sub_image -t my_ocrd_workflow-$sub_image -f Dockerfile-$sub_image . docker build --cache-from=my_ocrd_workflow-$sub_image -t my_ocrd_workflow-$sub_image -f Dockerfile-$sub_image .
done done

Loading…
Cancel
Save