mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-07-28 06:09:54 +02:00
🎨 Re-use ./run for ./run-docker-hub
This commit is contained in:
parent
0d61c258a6
commit
a5897ead97
2 changed files with 7 additions and 17 deletions
10
run
10
run
|
@ -1,16 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Run the my_ocrd_workflow container on the current workspace
|
# Run the my_ocrd_workflow container on the current workspace
|
||||||
|
|
||||||
# The container currently needs to run privileged to allow it to read from e.g.
|
set -e # Abort on error
|
||||||
# /home on SELinux secured systems such as Fedora. We might want to use udica
|
|
||||||
# instead in the future.
|
|
||||||
|
|
||||||
DOCKER_IMAGE=my_ocrd_workflow:latest # locally built
|
DOCKER_IMAGE=${DOCKER_IMAGE:-my_ocrd_workflow:latest} # default to locally built
|
||||||
|
|
||||||
if echo "$DOCKER_IMAGE" | grep -q "/"; then
|
if echo "$DOCKER_IMAGE" | grep -q "/"; then
|
||||||
docker pull "$DOCKER_IMAGE"
|
docker pull "$DOCKER_IMAGE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The container currently needs to run privileged to allow it to read from e.g.
|
||||||
|
# /home on SELinux secured systems such as Fedora. We might want to use udica
|
||||||
|
# instead in the future.
|
||||||
|
|
||||||
docker run --privileged=true --rm -t \
|
docker run --privileged=true --rm -t \
|
||||||
\
|
\
|
||||||
--user `id -u`:`id -g` \
|
--user `id -u`:`id -g` \
|
||||||
|
|
|
@ -5,16 +5,4 @@
|
||||||
# /home on SELinux secured systems such as Fedora. We might want to use udica
|
# /home on SELinux secured systems such as Fedora. We might want to use udica
|
||||||
# instead in the future.
|
# instead in the future.
|
||||||
|
|
||||||
DOCKER_IMAGE=mikegerber/my_ocrd_workflow:stable
|
DOCKER_IMAGE=mikegerber/my_ocrd_workflow:stable `dirname $0`/run
|
||||||
|
|
||||||
if echo "$DOCKER_IMAGE" | grep -q "/"; then
|
|
||||||
docker pull "$DOCKER_IMAGE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker run --privileged=true --rm -t \
|
|
||||||
\
|
|
||||||
--user `id -u`:`id -g` \
|
|
||||||
--mount type=bind,src="$(pwd)",target=/data \
|
|
||||||
\
|
|
||||||
-e LOG_LEVEL=$LOG_LEVEL \
|
|
||||||
$DOCKER_IMAGE
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue