From 08b2167352fd051d9d80afce5d5c1cb3aaf8846a Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Fri, 15 May 2020 10:42:08 +0200 Subject: shell.sh: new file Change-Id: Id05f559f0419e38684c449e2ee3603475256394a --- rpm-local/shell.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 rpm-local/shell.sh 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 -- cgit v1.2.3