21 lines
613 B
Bash
21 lines
613 B
Bash
#!/bin/sh
|
|
|
|
buildah_run_script() {
|
|
local cid script
|
|
cid=$1
|
|
shift
|
|
script=$(readlink -f "$1")
|
|
shift
|
|
mkdir -p binpkgs tmp
|
|
buildah run \
|
|
--mount type=cache,target=/var/db/repos/gentoo \
|
|
--mount type=cache,target=/var/cache \
|
|
--mount type=bind,src="${PWD}"/tmp,target=/var/tmp,rw,z \
|
|
--mount type=bind,src="${PWD}"/binpkgs,target=/var/cache/binpkgs,rw,z \
|
|
--mount type=bind,src="${script}",target=/run/script,ro,z \
|
|
--tty=false \
|
|
-e FEATURES='-ipc-sandbox -network-sandbox -pid-sandbox' \
|
|
"${cid}" \
|
|
/run/script "$@"
|
|
}
|