summaryrefslogtreecommitdiffstats
path: root/test/start_test.sh
blob: 7f81e6998bcc548b25932bb54d3a7aba59dda3a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

if [ -z "$1" ] ; then
  echo "usage: $0 <id of docker image>"
  exit 1
fi

basedir="$( cd -P "$( dirname "$0" )" && pwd )/munin"

docker run -it \
  -p 8080:8080 \
  -v $basedir/log:/var/log/munin \
  -v $basedir/lib:/var/lib/munin \
  -v $basedir/run:/run/munin \
  -v $basedir/cache:/var/cache/munin \
  -e MUNIN_USER=user \
  -e MUNIN_PASSWORD=secret \
  -e NODES="172.17.0.1:$(hostname)" \
  $1