From a6590ea0aecb22ba89a491100af76583e953d085 Mon Sep 17 00:00:00 2001 From: Quentin Le Sceller Date: Thu, 7 Jun 2018 14:04:51 -0400 Subject: [PATCH] Add doc and persistent storage for docker (#1140) * Add docker doc --- doc/build.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/build.md b/doc/build.md index cc93bb6cc..00e62c4f0 100644 --- a/doc/build.md +++ b/doc/build.md @@ -15,6 +15,19 @@ Please note that all mining functions for Grin have moved into a separate, stand [grin_miner](https://github.com/mimblewimble/grin-miner). Once your Grin code node is up and running, you can start mining by building and runing grin-miner against your running Grin node. +## Docker + + # Build using all available cores + docker build -t grin . + + # run in foreground + docker run -it -v grin:/usr/src/grin grin + + # or in background + docker run -it -d -v grin:/usr/src/grin grin + +If you decide to use a persistent storage (e.g. ```-v grin:/usr/src/grin```) you will need grin.toml configuration file in it. + ## Requirements - rust 1.24+ (use [rustup]((https://www.rustup.rs/))- i.e. `curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env`) @@ -53,7 +66,7 @@ See [Troubleshooting](https://github.com/mimblewimble/docs/wiki/Troubleshooting) A successful build gets you: - `target/debug/grin` - the main grin binary - + Grin is still sensitive to the directory from which it's run. Make sure you always run it within a directory that contains a `grin.toml` configuration and stay consistent as to where it's run from. @@ -88,7 +101,7 @@ The `grin.toml` file can placed in one of several locations, using the first one While it's recommended that you perform all grin server configuration via `grin.toml`, it's also possible to supply command line switches to grin that -override any settings in the `grin.toml` file. +override any settings in the `grin.toml` file. For help on grin commands and their switches, try: @@ -103,4 +116,3 @@ grin client help The wiki page [How to use grin](https://github.com/mimblewimble/docs/wiki/How-to-use-grin) and linked pages have more information on what features we have, troubleshooting, etc. -