Support running a stable version from Docker Hub

This commit is contained in:
Gerber, Mike 2020-03-02 16:57:24 +01:00
parent 6537e8284e
commit 0d61c258a6
2 changed files with 27 additions and 1 deletions

8
run
View file

@ -5,10 +5,16 @@
# /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=my_ocrd_workflow:latest # locally built
if echo "$DOCKER_IMAGE" | grep -q "/"; then
docker pull "$DOCKER_IMAGE"
fi
docker run --privileged=true --rm -t \ docker run --privileged=true --rm -t \
\ \
--user `id -u`:`id -g` \ --user `id -u`:`id -g` \
--mount type=bind,src="$(pwd)",target=/data \ --mount type=bind,src="$(pwd)",target=/data \
\ \
-e LOG_LEVEL=$LOG_LEVEL \ -e LOG_LEVEL=$LOG_LEVEL \
my_ocrd_workflow $DOCKER_IMAGE

20
run-docker-hub Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
# 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.
# /home on SELinux secured systems such as Fedora. We might want to use udica
# instead in the future.
DOCKER_IMAGE=mikegerber/my_ocrd_workflow:stable
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