diff --git a/Dockerfile b/Dockerfile index 5383362d..e6c743ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,5 @@ ENV HOME /root VOLUME /root/.twister # Run twisterd by default -CMD ["/twister-core/twisterd", "-rpcuser=user", "-rpcpassword=pwd", "-rpcallowip=172.17.42.1", "-htmldir=/twister-html", "-printtoconsole"] +ENTRYPOINT ["/twister-core/twisterd", "-rpcuser=user", "-rpcpassword=pwd", "-rpcallowip=172.17.42.1", "-htmldir=/twister-html", "-printtoconsole"] EXPOSE 28332 diff --git a/twister-on-docker b/twister-on-docker index 68ff06ea..bbe91c8c 100755 --- a/twister-on-docker +++ b/twister-on-docker @@ -11,6 +11,8 @@ REMOTE_IMAGE_NAME=mazzolino/twister set -e +shift + case $ACTION in build) @@ -20,12 +22,13 @@ build) run) if [ $MODE == "--remote" ]; then + shift IMAGE_NAME=$REMOTE_IMAGE_NAME echo Pulling new version of $IMAGE_NAME docker pull $IMAGE_NAME fi echo Running $IMAGE_NAME - docker run -d -p 28332:28332 -v $HOME/.twister:/root/.twister $IMAGE_NAME + docker run -d -p 28332:28332 -v $HOME/.twister:/root/.twister $IMAGE_NAME "$@" echo Twister should now be running at http://localhost:28332 ;; @@ -40,10 +43,10 @@ stop) *) echo Usage: - echo " $0 run" + echo " $0 run [ARGS FOR TWISTERD..]" echo " Run twister from a local docker build (default)" echo - echo " $0 run --remote" + echo " $0 run --remote [ARGS FOR TWISTERD..]" echo " Run twister from the remote docker build at \"$REMOTE_IMAGE_NAME\"" echo echo " $0 build"