项目作者: RagingTiger

项目描述 :
Dockerized Monero Binaries
高级语言:
项目地址: git://github.com/RagingTiger/docker-monero.git
创建时间: 2020-04-20T19:46:15Z
项目社区:https://github.com/RagingTiger/docker-monero

开源协议:

下载


About

Dockerized Monero binaries from: https://web.getmonero.org/downloads/#cli

Build

To build the repository, pull the git repo, switch to the branch for your
CPU architecture (i.e. AMD64, ARM32v7), and docker build:

  1. $ git clone https://github.com/RagingTiger/docker-monero
  2. $ cd docker-monero
  3. $ git checkout arm # or amd64
  4. $ docker build -t monero:arm .

Security

Here we discuss some of the security measures taken to ensure the integrity of
the docker images built from the Monero binaries.

Binary Verification

You will notice that the Dockerfile, shown below, goes through all the
security checks listed here
to validate the binaries by checking the hashes of the tar file:

  1. $ cat Dockerfile
  2. .
  3. .
  4. .
  5. # set monero binary version
  6. ARG MONERO_BIN_VER='monero-linux-x64-v0.15.0.5.tar.bz2'
  7. # verify
  8. ENV FINGERPRINT='Key fingerprint = 81AC 591F E9C4 B65C 5806 AFC3 F0AF 4D46 2A0B DF92'
  9. RUN set -ex && \
  10. if gpg --keyid-format long --with-fingerprint binaryfate.asc | grep "${FINGERPRINT}" && \
  11. gpg --import binaryfate.asc && \
  12. gpg --verify hashes.txt && \
  13. cat hashes.txt | grep "$(shasum -a 256 ${MONERO_BIN_VER} | awk '{print $1}')" ; then \
  14. echo "Verification Success" ; \
  15. tar -xvjf ${MONERO_BIN_VER} -C /home --strip-components=1; \
  16. ls -lha /home ; \
  17. else \
  18. echo "Verification Failed"; exit 1; \
  19. fi
  20. .
  21. .
  22. .

So when you docker build the image, it will only succeed if everything checks
out via the process outlined in the
Monero Docs.

Docker Trust

The images located at tigerj/monero have two signed tags: amd64 and arm.
You can check for the trusted images as follows:

  1. $ docker trust inspect tigerj/monero
  2. Signatures for tigerj/monero
  3. SIGNED TAG DIGEST SIGNERS
  4. amd64 94e5d94fe941832e64916fded39d65422066e4990fb55ff440b2ab5ce05a3dec tigerj
  5. arm b7f826e8b789f45e74980b86ae5e19294af1291932e0a20709c530baed567ff7 tigerj
  6. List of signers and their keys for tigerj/monero
  7. SIGNER KEYS
  8. tigerj e85d1c1cb2c9
  9. Administrative keys for tigerj/monero
  10. Repository Key: d86a0081cf3939b9194e6252add1c3c3afe1b4bc01c1566423afe3636b4a6fc3
  11. Root Key: 3e7162f729a5355eaec6a12c2ed5ed5c97d63bd23f7ea3c5cac38832259fa10a

Monero Daemon Docs

An attempt to document some of the features of the Monero daemon.

monerod —help

  1. $ docker run --rm -it tigerj/monero:amd64 monerod --help
  2. Monero 'Carbon Chamaeleon' (v0.15.0.5-release)
  3. Usage: monerod [options|settings] [daemon_command...]
  4. Options:
  5. --help Produce help message
  6. --version Output version information
  7. --os-version OS for which this executable was
  8. compiled
  9. --config-file arg (=/home/monero/.bitmonero/bitmonero.conf, /home/monero/.bitmonero/testnet/bitmonero.conf if 'testnet', /home/monero/.bitmonero/stagenet/bitmonero.conf if 'stagenet')
  10. Specify configuration file
  11. --detach Run as daemon
  12. --pidfile arg File path to write the daemon's PID to
  13. (optional, requires --detach)
  14. --non-interactive Run non-interactive
  15. Settings:
  16. --log-file arg (=/home/monero/.bitmonero/bitmonero.log, /home/monero/.bitmonero/testnet/bitmonero.log if 'testnet', /home/monero/.bitmonero/stagenet/bitmonero.log if 'stagenet')
  17. Specify log file
  18. --log-level arg
  19. --max-log-file-size arg (=104850000) Specify maximum log file size [B]
  20. --max-log-files arg (=50) Specify maximum number of rotated log
  21. files to be saved (no limit by setting
  22. to 0)
  23. --max-concurrency arg (=0) Max number of threads to use for a
  24. parallel job
  25. --public-node Allow other users to use the node as a
  26. remote (restricted RPC mode, view-only
  27. commands) and advertise it over P2P
  28. --zmq-rpc-bind-ip arg (=127.0.0.1) IP for ZMQ RPC server to listen on
  29. --zmq-rpc-bind-port arg (=18082, 28082 if 'testnet', 38082 if 'stagenet')
  30. Port for ZMQ RPC server to listen on
  31. --no-zmq Disable ZMQ RPC server
  32. --data-dir arg (=/home/monero/.bitmonero, /home/monero/.bitmonero/testnet if 'testnet', /home/monero/.bitmonero/stagenet if 'stagenet')
  33. Specify data directory
  34. --test-drop-download For net tests: in download, discard ALL
  35. blocks instead checking/saving them
  36. (very fast)
  37. --test-drop-download-height arg (=0) Like test-drop-download but discards
  38. only after around certain height
  39. --testnet Run on testnet. The wallet must be
  40. launched with --testnet flag.
  41. --stagenet Run on stagenet. The wallet must be
  42. launched with --stagenet flag.
  43. --regtest Run in a regression testing mode.
  44. --fixed-difficulty arg (=0) Fixed difficulty used for testing.
  45. --enforce-dns-checkpointing checkpoints from DNS server will be
  46. enforced
  47. --prep-blocks-threads arg (=4) Max number of threads to use when
  48. preparing block hashes in groups.
  49. --fast-block-sync arg (=1) Sync up most of the way by using
  50. embedded, known block hashes.
  51. --show-time-stats arg (=0) Show time-stats when processing
  52. blocks/txs and disk synchronization.
  53. --block-sync-size arg (=0) How many blocks to sync at once during
  54. chain synchronization (0 = adaptive).
  55. --check-updates arg (=notify) Check for new versions of monero:
  56. [disabled|notify|download|update]
  57. --fluffy-blocks Relay blocks as fluffy blocks
  58. (obsolete, now default)
  59. --no-fluffy-blocks Relay blocks as normal blocks
  60. --test-dbg-lock-sleep arg (=0) Sleep time in ms, defaults to 0 (off),
  61. used to debug before/after locking
  62. mutex. Values 100 to 1000 are good for
  63. tests.
  64. --offline Do not listen for peers, nor connect to
  65. any
  66. --disable-dns-checkpoints Do not retrieve checkpoints from DNS
  67. --block-download-max-size arg (=0) Set maximum size of block download
  68. queue in bytes (0 for default)
  69. --sync-pruned-blocks Allow syncing from nodes with only
  70. pruned blocks
  71. --max-txpool-weight arg (=648000000) Set maximum txpool weight in bytes.
  72. --pad-transactions Pad relayed transactions to help defend
  73. against traffic volume analysis
  74. --block-notify arg Run a program for each new block, '%s'
  75. will be replaced by the block hash
  76. --prune-blockchain Prune blockchain
  77. --reorg-notify arg Run a program for each reorg, '%s' will
  78. be replaced by the split height, '%h'
  79. will be replaced by the new blockchain
  80. height, '%n' will be replaced by the
  81. number of new blocks in the new chain,
  82. and '%d' will be replaced by the number
  83. of blocks discarded from the old chain
  84. --block-rate-notify arg Run a program when the block rate
  85. undergoes large fluctuations. This
  86. might be a sign of large amounts of
  87. hash rate going on and off the Monero
  88. network, and thus be of potential
  89. interest in predicting attacks. %t will
  90. be replaced by the number of minutes
  91. for the observation window, %b by the
  92. number of blocks observed within that
  93. window, and %e by the number of blocks
  94. that was expected in that window. It is
  95. suggested that this notification is
  96. used to automatically increase the
  97. number of confirmations required before
  98. a payment is acted upon.
  99. --keep-alt-blocks Keep alternative blocks on restart
  100. --extra-messages-file arg Specify file for extra messages to
  101. include into coinbase transactions
  102. --start-mining arg Specify wallet address to mining for
  103. --mining-threads arg Specify mining threads count
  104. --bg-mining-enable enable background mining
  105. --bg-mining-ignore-battery if true, assumes plugged in when unable
  106. to query system power status
  107. --bg-mining-min-idle-interval arg Specify min lookback interval in
  108. seconds for determining idle state
  109. --bg-mining-idle-threshold arg Specify minimum avg idle percentage
  110. over lookback interval
  111. --bg-mining-miner-target arg Specify maximum percentage cpu use by
  112. miner(s)
  113. --db-sync-mode arg (=fast:async:250000000bytes)
  114. Specify sync option, using format
  115. [safe|fast|fastest]:[sync|async]:[<nblo
  116. cks_per_sync>[blocks]|<nbytes_per_sync>
  117. [bytes]].
  118. --db-salvage Try to salvage a blockchain database if
  119. it seems corrupted
  120. --p2p-bind-ip arg (=0.0.0.0) Interface for p2p network protocol
  121. (IPv4)
  122. --p2p-bind-ipv6-address arg (=::) Interface for p2p network protocol
  123. (IPv6)
  124. --p2p-bind-port arg (=18080, 28080 if 'testnet', 38080 if 'stagenet')
  125. Port for p2p network protocol (IPv4)
  126. --p2p-bind-port-ipv6 arg (=18080, 28080 if 'testnet', 38080 if 'stagenet')
  127. Port for p2p network protocol (IPv6)
  128. --p2p-use-ipv6 Enable IPv6 for p2p
  129. --p2p-ignore-ipv4 Ignore unsuccessful IPv4 bind for p2p
  130. --p2p-external-port arg (=0) External port for p2p network protocol
  131. (if port forwarding used with NAT)
  132. --allow-local-ip Allow local ip add to peer list, mostly
  133. in debug purposes
  134. --add-peer arg Manually add peer to local peerlist
  135. --add-priority-node arg Specify list of peers to connect to and
  136. attempt to keep the connection open
  137. --add-exclusive-node arg Specify list of peers to connect to
  138. only. If this option is given the
  139. options add-priority-node and seed-node
  140. are ignored
  141. --seed-node arg Connect to a node to retrieve peer
  142. addresses, and disconnect
  143. --tx-proxy arg Send local txes through proxy:
  144. <network-type>,<socks-ip:port>[,max_con
  145. nections][,disable_noise] i.e.
  146. "tor,127.0.0.1:9050,100,disable_noise"
  147. --anonymous-inbound arg <hidden-service-address>,<[bind-ip:]por
  148. t>[,max_connections] i.e.
  149. "x.onion,127.0.0.1:18083,100"
  150. --hide-my-port Do not announce yourself as peerlist
  151. candidate
  152. --no-sync Don't synchronize the blockchain with
  153. other peers
  154. --no-igd Disable UPnP port mapping
  155. --igd arg (=delayed) UPnP port mapping (disabled, enabled,
  156. delayed)
  157. --out-peers arg (=-1) set max number of out peers
  158. --in-peers arg (=-1) set max number of in peers
  159. --tos-flag arg (=-1) set TOS flag
  160. --limit-rate-up arg (=2048) set limit-rate-up [kB/s]
  161. --limit-rate-down arg (=8192) set limit-rate-down [kB/s]
  162. --limit-rate arg (=-1) set limit-rate [kB/s]
  163. --rpc-bind-port arg (=18081, 28081 if 'testnet', 38081 if 'stagenet')
  164. Port for RPC server
  165. --rpc-restricted-bind-port arg Port for restricted RPC server
  166. --restricted-rpc Restrict RPC to view only commands and
  167. do not return privacy sensitive data in
  168. RPC calls
  169. --bootstrap-daemon-address arg URL of a 'bootstrap' remote daemon that
  170. the connected wallets can use while
  171. this daemon is still not fully synced.
  172. Use 'auto' to enable automatic public
  173. nodes discovering and bootstrap daemon
  174. switching
  175. --bootstrap-daemon-login arg Specify username:password for the
  176. bootstrap daemon login
  177. --rpc-bind-ip arg (=127.0.0.1) Specify IP to bind RPC server
  178. --rpc-bind-ipv6-address arg (=::1) Specify IPv6 address to bind RPC server
  179. --rpc-use-ipv6 Allow IPv6 for RPC
  180. --rpc-ignore-ipv4 Ignore unsuccessful IPv4 bind for RPC
  181. --rpc-login arg Specify username[:password] required
  182. for RPC server
  183. --confirm-external-bind Confirm rpc-bind-ip value is NOT a
  184. loopback (local) IP
  185. --rpc-access-control-origins arg Specify a comma separated list of
  186. origins to allow cross origin resource
  187. sharing
  188. --rpc-ssl arg (=autodetect) Enable SSL on RPC connections:
  189. enabled|disabled|autodetect
  190. --rpc-ssl-private-key arg Path to a PEM format private key
  191. --rpc-ssl-certificate arg Path to a PEM format certificate
  192. --rpc-ssl-ca-certificates arg Path to file containing concatenated
  193. PEM format certificate(s) to replace
  194. system CA(s).
  195. --rpc-ssl-allowed-fingerprints arg List of certificate fingerprints to
  196. allow
  197. --rpc-ssl-allow-chained Allow user (via --rpc-ssl-certificates)
  198. chain certificates
  199. --rpc-ssl-allow-any-cert Allow any peer certificate
  200. --rpc-payment-address arg Restrict RPC to clients sending
  201. micropayment to this address
  202. --rpc-payment-difficulty arg (=1000) Restrict RPC to clients sending
  203. micropayment at this difficulty
  204. --rpc-payment-credits arg (=100) Restrict RPC to clients sending
  205. micropayment, yields that many credits
  206. per payment