Guest User

Untitled

a guest
Oct 2nd, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. BITCOIN_ECR_IMAGE=$AWS_ACCOUNT.dkr.ecr.$ECR_REGION.amazonaws.com/bitcoin-unlimited:$TAG_bitcoin_ecr_tag
  2.  
  3. # Log in to ECR so we can pull the docker image
  4. $(/usr/local/bin/aws ecr get-login --region $ECR_REGION --no-include-email)
  5.  
  6. docker pull $BITCOIN_ECR_IMAGE
  7. docker run -d --name bitcoin \
  8. -p ${BITCOIN_RPC_PORT}-${BITCOIN_PORT}:${BITCOIN_RPC_PORT}-${BITCOIN_PORT} \
  9. --restart unless-stopped \
  10. -v /var/bitcoin:/var/bitcoin \
  11. $BITCOIN_ECR_IMAGE \
  12. bitcoind \
  13. -conf=/root/.bitcoin/bitcoin.conf \
  14. -whitelist=$DOCKER_HOST_ADDRESS/32 \
  15. -server=1 \
  16. -listen=1 \
  17. -datadir=/var/bitcoin ${TAG_bitcoind_flags} \
  18. -rpcuser=${TAG_rpcuser} \
  19. -rpcpassword=${TAG_rpcpassword} \
  20. -net.magic=${TAG_netmagic}
  21.  
  22. log "Waiting for node to start listening on RPC port $BITCOIN_RPC_PORT and node communication port $BITCOIN_PORT ..."
  23. while ! nc -z localhost $BITCOIN_RPC_PORT ; do
  24. sleep 0.1
  25. done
  26.  
  27. while ! nc -z localhost $BITCOIN_PORT ; do
  28. sleep 0.1
  29. done
Add Comment
Please, Sign In to add comment