diff options
Diffstat (limited to 'rpm-local/shell.sh')
-rwxr-xr-x | rpm-local/shell.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/rpm-local/shell.sh b/rpm-local/shell.sh new file mode 100755 index 0000000..5fd4a8e --- /dev/null +++ b/rpm-local/shell.sh @@ -0,0 +1,20 @@ +#!/bin/sh -ex +DIR="$(cd "$(dirname "$0")" && pwd -P)" +IMAGE="centos8" + +if ! [ -e ".build.docker.$IMAGE" ]; then + echo "ERROR: run build.sh first, to generate the docker img" + exit 1 +fi + + +docker run \ + -it \ + --rm \ + -v "$DIR/rpmbuild:/home/user/rpmbuild" \ + -v "$DIR/scripts:/scripts" \ + -v "$DIR/cache/$IMAGE/dnf:/var/cache/dnf" \ + -v "$DIR/cache/yum_repos:/root/yum_repos" \ + -v "$DIR/cache/distfiles:/home/user/distfiles" \ + "$IMAGE:latest" \ + bash |