-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-docker.sh
executable file
·50 lines (45 loc) · 930 Bytes
/
local-docker.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
REPO=quay.io/quay/quay-dev
d ()
{
docker build -t $REPO -f dev.df --build-arg src_subdir=$(basename `pwd`) .
#ENV_VARS="foo=bar key=value name=joe"
local envStr=""
if [[ "$ENV_VARS" != "" ]];then
for envVar in $ENV_VARS;do
envStr="${envStr} -e \"${envVar}\""
done
fi
docker -- run --rm $envStr -v /var/run/docker.sock:/run/docker.sock -it --net=host -v $(pwd)/..:/src $REPO $*
}
case $1 in
buildman)
d /venv/bin/python -m buildman.builder
;;
dev)
d bash /src/quay/local-run.sh
;;
notifications)
d /venv/bin/python -m workers.notificationworker
;;
test)
d bash /src/quay/local-test.sh
;;
initdb)
rm -f test/data/test.db
d /venv/bin/python initdb.py
;;
fulldbtest)
d bash /src/quay/test/fulldbtest.sh
;;
prom)
R=quay.io/quay/prom-monitor
docker build -t $R prom_aggregator
docker run --rm -it --net=host $R -loglevel=debug
;;
*)
echo "unknown option"
exit 1
;;
esac