-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker_run
executable file
·29 lines (25 loc) · 806 Bytes
/
docker_run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
docker_image=${DOCKER_IMAGE:-"ghcr.io/trustedcomputinggroup/pandoc:latest"}
print_usage() {
echo "Usage:"
echo "$(basename "${0}") [options] [build.sh arguments]"
echo
echo "Arguments:"
echo " Arguments to this script are passed as parameters to build.sh inside of the docker conatiner"
echo
echo "Environment:"
echo
echo "DOCKER_IMAGE: set this env variable to the docker image to run, defaults to ${docker_image}"
echo
echo "Options:"
echo
echo "Miscellaneous"
echo " --help: output this message"
}
# hand process options as we want all options to go to docker run command except ones we know
if test "${1}" == "--help"; then
print_usage
exit 0
fi
echo "Launching Container: ${docker_image}"
docker run -v "$(pwd):/workspace" -w/workspace "${docker_image}" "$@"