mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-22 12:34:24 +00:00
[docker] Use twisterd commandline as ENTRYPOINT instead of CMD
- allows running the container with additional command line parameters
This commit is contained in:
parent
6fd09eba18
commit
915bebd288
@ -21,5 +21,5 @@ ENV HOME /root
|
|||||||
VOLUME /root/.twister
|
VOLUME /root/.twister
|
||||||
|
|
||||||
# Run twisterd by default
|
# 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
|
EXPOSE 28332
|
||||||
|
@ -11,6 +11,8 @@ REMOTE_IMAGE_NAME=mazzolino/twister
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
case $ACTION in
|
case $ACTION in
|
||||||
|
|
||||||
build)
|
build)
|
||||||
@ -20,12 +22,13 @@ build)
|
|||||||
|
|
||||||
run)
|
run)
|
||||||
if [ $MODE == "--remote" ]; then
|
if [ $MODE == "--remote" ]; then
|
||||||
|
shift
|
||||||
IMAGE_NAME=$REMOTE_IMAGE_NAME
|
IMAGE_NAME=$REMOTE_IMAGE_NAME
|
||||||
echo Pulling new version of $IMAGE_NAME
|
echo Pulling new version of $IMAGE_NAME
|
||||||
docker pull $IMAGE_NAME
|
docker pull $IMAGE_NAME
|
||||||
fi
|
fi
|
||||||
echo Running $IMAGE_NAME
|
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
|
echo Twister should now be running at http://localhost:28332
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -40,10 +43,10 @@ stop)
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
echo Usage:
|
echo Usage:
|
||||||
echo " $0 run"
|
echo " $0 run [ARGS FOR TWISTERD..]"
|
||||||
echo " Run twister from a local docker build (default)"
|
echo " Run twister from a local docker build (default)"
|
||||||
echo
|
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 " Run twister from the remote docker build at \"$REMOTE_IMAGE_NAME\""
|
||||||
echo
|
echo
|
||||||
echo " $0 build"
|
echo " $0 build"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user