Skip to content

Instantly share code, notes, and snippets.

@Zatvobor
Last active May 20, 2017 12:59
Show Gist options
  • Save Zatvobor/8ac09b266802aed31989 to your computer and use it in GitHub Desktop.
Save Zatvobor/8ac09b266802aed31989 to your computer and use it in GitHub Desktop.
DASHD Dockerfile
FROM ubuntu:14.04
MAINTAINER Zatvobor <http://zatvobor.github.io>
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#RUN echo 'root:screencast' | chpasswd
ENV HOME /dash
RUN /usr/sbin/useradd -s /bin/bash -m -d /dash dash && chown dash:dash -R /dash
ENV DASH_VERSION 0.12.0.56
ENV DASH_DOWNLOAD_URL https://www.dashpay.io/binaries/dash-$DASH_VERSION-linux64.tar.gz
ENV DASH_SHA256 cd645b1dead2ece19f1ca9805decd314cc6b3970499dd02ab5273578e5ba663c
RUN cd /tmp \
&& curl -sSL "$DASH_DOWNLOAD_URL" -o dash.tgz \
&& echo "$DASH_SHA256 *dash.tgz" | /usr/bin/sha256sum -c - \
&& tar xzf dash.tgz --no-anchored dashd dash-cli --transform='s/.*\///' \
&& mv dashd dash-cli /usr/bin/ \
&& rm -rf dash* \
&& echo "#""!/bin/bash\n/usr/bin/dashd -datadir=/dash \"\$@\"" > /usr/local/bin/dashd \
&& echo "#""!/bin/bash\n/usr/bin/dash-cli -datadir=/dash \"\$@\"" > /usr/local/bin/dash-cli \
&& chmod a+x /usr/local/bin/dashd /usr/local/bin/dash-cli /usr/bin/dashd /usr/bin/dash-cli
USER dash
VOLUME ["/dash"]
EXPOSE 9999 9998
# Default arguments, can be overriden
CMD ["dashd"]
@Zatvobor
Copy link
Author

dash@e23747c61669:/$ dash-cli --help
Dash Core RPC client version v0.12.0.55-c30a0aa

Usage:
  dash-cli [options] <command> [params]  Send command to Dash Core
  dash-cli [options] help                List commands
  dash-cli [options] help <command>      Get help for a command

Options:
  -?                     This help message
  -conf=<file>           Specify configuration file (default: dash.conf)
  -datadir=<dir>         Specify data directory
  -testnet               Use the test network
  -regtest               Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.
  -rpcconnect=<ip>       Send commands to node running on <ip> (default: 127.0.0.1)
  -rpcport=<port>        Connect to JSON-RPC on <port> (default: 9998 or testnet: 19998)
  -rpcwait               Wait for RPC server to start
  -rpcuser=<user>        Username for JSON-RPC connections
  -rpcpassword=<pw>      Password for JSON-RPC connections

SSL options: (see the Bitcoin Wiki for SSL setup instructions)
  -rpcssl                Use OpenSSL (https) for JSON-RPC connections

@Zatvobor
Copy link
Author

chuck@chuck ~ $ dash-cli help
== Blockchain ==
getbestblockhash
getblock "hash" ( verbose )
getblockchaininfo
getblockcount
getblockhash index
getblockheader "hash" ( verbose )
getchaintips
getdifficulty
getmempoolinfo
getrawmempool ( verbose )
gettxout "txid" n ( includemempool )
gettxoutsetinfo
verifychain ( checklevel numblocks )

== Control ==
getinfo
help ( "command" )
stop

== Dash ==
darksend <dashaddress> <amount>
masternode "command"... ( "passphrase" )
masternodelist ( "mode" "filter" )
mnbudget "command"... ( "passphrase" )
mnbudgetvoteraw <masternode-tx-hash> <masternode-tx-index> <proposal-hash> <yes|no> <time> <vote-sig>
mnfinalbudget "command"... ( "passphrase" )
mnsync [status|reset]
spork <name> [<value>]

== Generating ==
getgenerate
gethashespersec
setgenerate generate ( genproclimit )

== Mining ==
getblocktemplate ( "jsonrequestobject" )
getmininginfo
getnetworkhashps ( blocks height )
prioritisetransaction <txid> <priority delta> <fee delta>
submitblock "hexdata" ( "jsonparametersobject" )

== Network ==
addnode "node" "add|remove|onetry"
getaddednodeinfo dns ( "node" )
getconnectioncount
getnettotals
getnetworkinfo
getpeerinfo
ping

== Rawtransactions ==
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}
decoderawtransaction "hexstring"
decodescript "hex"
getrawtransaction "txid" ( verbose )
sendrawtransaction "hexstring" ( allowhighfees )
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

== Util ==
createmultisig nrequired ["key",...]
estimatefee nblocks
estimatepriority nblocks
validateaddress "dashaddress"
verifymessage "dashaddress" "signature" "message"

== Wallet ==
addmultisigaddress nrequired ["key",...] ( "account" )
backupwallet "destination"
dumpprivkey "dashaddress"
dumpwallet "filename"
getaccount "dashaddress"
getaccountaddress "account"
getaddressesbyaccount "account"
getbalance ( "account" minconf includeWatchonly )
getnewaddress ( "account" )
getrawchangeaddress
getreceivedbyaccount "account" ( minconf )
getreceivedbyaddress "dashaddress" ( minconf )
gettransaction "txid" ( includeWatchonly )
getunconfirmedbalance
getwalletinfo
importaddress "address" ( "label" rescan )
importprivkey "dashprivkey" ( "label" rescan )
importwallet "filename"
keepass <genkey|init|setpassphrase>
keypoolrefill ( newsize )
listaccounts ( minconf includeWatchonly)
listaddressgroupings
listlockunspent
listreceivedbyaccount ( minconf includeempty includeWatchonly)
listreceivedbyaddress ( minconf includeempty includeWatchonly)
listsinceblock ( "blockhash" target-confirmations includeWatchonly)
listtransactions ( "account" count from includeWatchonly)
listunspent ( minconf maxconf  ["address",...] )
lockunspent unlock [{"txid":"txid","vout":n},...]
move "fromaccount" "toaccount" amount ( minconf "comment" )
sendfrom "fromaccount" "todashaddress" amount ( minconf "comment" "comment-to" )
sendmany "fromaccount" {"address":amount,...} ( minconf "comment" )
sendtoaddress "dashaddress" amount ( "comment" "comment-to" )
sendtoaddressix "dashaddress" amount ( "comment" "comment-to" )
setaccount "dashaddress" "account"
settxfee amount
signmessage "dashaddress" "message"
walletlock
walletpassphrase "passphrase" timeout ( anonymizeonly )
walletpassphrasechange "oldpassphrase" "newpassphrase"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment