File: autogen-container.sh

package info (click to toggle)
radvd 1%3A2.20-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,416 kB
  • sloc: ansic: 5,780; sh: 5,467; yacc: 1,002; makefile: 265; lex: 168
file content (21 lines) | stat: -rwxr-xr-x 493 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
set -e -x
IMAGE=radvd-autogen:latest
IMAGE_PRESENT=0
if docker images -q "${IMAGE}" |grep -sq . ; then
	IMAGE_PRESENT=1
fi
if [ "$IMAGE_PRESENT" -eq 0 ]; then
	docker build -f Docker.autogen -t "${IMAGE}" .
fi
CONTAINER_USER="$(id -u):$(id -g)"
docker run \
	--network=none \
	--user="${CONTAINER_USER}" \
	--mount=type=bind,src="${PWD}",dst=/workdir,ro=false \
	--rm=true \
	--privileged=false \
	--security-opt=no-new-privileges \
	--tty=false \
	--interactive=false \
	"${IMAGE}"