diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-22 02:25:35 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-22 02:25:35 +0300 |
| commit | 7174f651a23659b619769c75318b15e25c3b1422 (patch) | |
| tree | a3de133a133ae16faacc8895ae49e51487910ed2 /docker/docker-run.sh | |
| parent | 4cdabb5b51065f5130599c513b6ec77368ed89d1 (diff) | |
docker: initial commit
Diffstat (limited to 'docker/docker-run.sh')
| -rwxr-xr-x | docker/docker-run.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docker/docker-run.sh b/docker/docker-run.sh new file mode 100755 index 00000000..7df2d95d --- /dev/null +++ b/docker/docker-run.sh @@ -0,0 +1,14 @@ +#!/bin/bash +if [ ! -e .git ]; then + echo run from top level checkout of rhizi repository + exit 0 +fi +# cannot bind to localhost in docker, must bind to 0.0.0.0 +PORT=8080 +if [ "x$1" != "x" ]; then + PORT=$1 +fi +sed -i -e 's/listen_address = 127.0.0.1/listen_address = 0.0.0.0/' res/etc/rhizi-server.conf +sed -i -e "s/listen_port.*/listen_port = $PORT/" res/etc/rhizi-server.conf +sed -i -e "s/SERVER_NAME.*/SERVER_NAME = rhizi.local:$PORT/" res/etc/rhizi-server.conf +docker run -it -p $PORT:$PORT -v `pwd`:/home/rhizi alon/rhizi:test1 ./run-both-local.sh |
