mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-02-02 01:44:14 +00:00
Fix rpcallowip to use the real bridge IP in the Docker container
This is needed for Docker >=1.9 because the bridge IP is not necessarily 172.17.42.1 anymore. (See https://github.com/docker/docker/issues/17305 for reference.) refs #357
This commit is contained in:
parent
b5e58adef2
commit
b1b0ec8709
@ -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
Executable file
6
docker-entrypoint.sh
Executable file
@ -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…
x
Reference in New Issue
Block a user