Browse Source

Merge pull request #358 from djmaze/fix-rpcallowip-for-docker

Fix rpcallowip to use the real bridge IP in the Docker container
miguelfreitas
miguelfreitas 9 years ago
parent
commit
59a1b66b3f
  1. 2
      Dockerfile
  2. 6
      docker-entrypoint.sh

2
Dockerfile

@ -21,5 +21,5 @@ ENV HOME /root @@ -21,5 +21,5 @@ ENV HOME /root
VOLUME /root/.twister
# Run twisterd by default
ENTRYPOINT ["/twister-core/twisterd", "-rpcuser=user", "-rpcpassword=pwd", "-rpcallowip=172.17.42.1", "-htmldir=/twister-html", "-printtoconsole", "-port=28333"]
ENTRYPOINT ["/twister-core/docker-entrypoint"]
EXPOSE 28332

6
docker-entrypoint.sh

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
#!/bin/bash
set -e
BRIDGE_IP=$(ip ro get 8.8.8.8 | grep -oP '(?<=via )([\d\.]+)')
exec /twister-core/twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=${BRIDGE_IP} -htmldir=/twister-html -printtoconsole -port=28333 $*
Loading…
Cancel
Save