Add doc and persistent storage for docker (#1140)

* Add docker doc
This commit is contained in:
Quentin Le Sceller 2018-06-07 14:04:51 -04:00 committed by GitHub
parent ebee05591b
commit a6590ea0ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, [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. 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 ## Requirements
- rust 1.24+ (use [rustup]((https://www.rustup.rs/))- i.e. `curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env`) - 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: A successful build gets you:
- `target/debug/grin` - the main grin binary - `target/debug/grin` - the main grin binary
Grin is still sensitive to the directory from which it's run. Make sure you 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 always run it within a directory that contains a `grin.toml` configuration and
stay consistent as to where it's run from. 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 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 `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: 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) 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, and linked pages have more information on what features we have,
troubleshooting, etc. troubleshooting, etc.