You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
3.5 KiB

  1. Using Docker
  2. ============
  3. `This folder <https://github.com/tendermint/tools/tree/master/docker>`__ contains Docker container descriptions. Using this folder
  4. you can build your own Docker images with the tendermint application.
  5. It is assumed that you have already setup docker.
  6. If you don't want to build the images yourself, you should be able to
  7. download them from Docker Hub.
  8. Tendermint
  9. ----------
  10. Build the container: Copy the ``tendermint`` binary to the
  11. ``tendermint`` folder.
  12. ::
  13. docker build -t tendermint tendermint
  14. The application configuration will be stored at ``/tendermint`` in the
  15. container. The ports 46656 and 46657 will be open for ABCI applications
  16. to connect.
  17. Initialize tendermint configuration and keep it after the container is
  18. finished in a docker volume called ``data``:
  19. ::
  20. docker run --rm -v data:/tendermint tendermint init
  21. If you want the docker volume to be a physical directory on your
  22. filesystem, you have to give an absolute path to docker and make sure
  23. the permissions allow the application to write it.
  24. Get the public key of tendermint:
  25. ::
  26. docker run --rm -v data:/tendermint tendermint show_validator
  27. Run the docker tendermint application with:
  28. ::
  29. docker run --rm -d -v data:/tendermint tendermint node
  30. Basecoin
  31. --------
  32. Build the container: Copy the ``basecoin`` binary to the ``basecoin``
  33. folder.
  34. ::
  35. docker build -t basecoin basecoin
  36. The application configuration will be stored at ``/basecoin``.
  37. Initialize basecoin configuration and keep it after the container is
  38. finished:
  39. ::
  40. docker run --rm -v basecoindata:/basecoin basecoin init deadbeef
  41. Use your own basecoin account instead of ``deadbeef`` in the ``init``
  42. command.
  43. Get the public key of basecoin: We use a trick here: since the basecoin
  44. and the tendermint configuration folders are similar, the ``tendermint``
  45. command can extract the public key for us if we feed the basecoin
  46. configuration folder to tendermint.
  47. ::
  48. docker run --rm -v basecoindata:/tendermint tendermint show_validator
  49. Run the docker tendermint application with: This is a two-step process:
  50. \* Run the basecoin container. \* Run the tendermint container and
  51. expose the ports that allow clients to connect. The --proxy\_app should
  52. contain the basecoin application's IP address and port.
  53. ::
  54. docker run --rm -d -v basecoindata:/basecoin basecoin start --without-tendermint
  55. docker run --rm -d -v data:/tendermint -p 46656-46657:46656-46657 tendermint node --proxy_app tcp://172.17.0.2:46658
  56. Ethermint
  57. ---------
  58. Build the container: Copy the ``ethermint`` binary and the setup folder
  59. to the ``ethermint`` folder.
  60. ::
  61. docker build -t ethermint ethermint
  62. The application configuration will be stored at ``/ethermint``. The
  63. files required for initializing ethermint (the files in the source
  64. ``setup`` folder) are under ``/setup``.
  65. Initialize ethermint configuration:
  66. ::
  67. docker run --rm -v ethermintdata:/ethermint ethermint init /setup/genesis.json
  68. Start ethermint as a validator node: This is a two-step process: \* Run
  69. the ethermint container. You will have to define where tendermint runs
  70. as the ethermint binary connects to it explicitly. \* Run the tendermint
  71. container and expose the ports that allow clients to connect. The
  72. --proxy\_app should contain the ethermint application's IP address and
  73. port.
  74. ::
  75. docker run --rm -d -v ethermintdata:/ethermint ethermint --tendermint_addr tcp://172.17.0.3:46657
  76. docker run --rm -d -v data:/tendermint -p 46656-46657:46656-46657 tendermint node --proxy_app tcp://172.17.0.2:46658