Skip to content

Commit 8020583

Browse files
committed
Added docker docs to launch a client node + some docs corrections
1 parent 547f41d commit 8020583

File tree

2 files changed

+53
-11
lines changed

2 files changed

+53
-11
lines changed

source/docs/index.md

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
1-
title: How to run the node
1+
title: How to run a client node
22
--------------------------
33

4-
## What you'll need
4+
## Using Docker
5+
6+
The easiest way of launching a client node is using the [official docker image](https://hub.docker.com/r/nuls/client-node/)
7+
8+
[Docker](https://www.docker.com/) is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
9+
10+
You can run a full nuls client node with a single line:
11+
```sh
12+
docker run --name nuls-node -d \
13+
-p 127.0.0.1:6001:6001 \
14+
-v /tmp/nuls/logs:/nuls/logs \
15+
-v /tmp/nuls/data:/nuls/data \
16+
nuls/client-node:1.0.1
17+
```
18+
19+
By default the client interface is accessible in the port `6001`, so once the node is running, check that everything is working visiting the url [localhost:6001](http://localhost:6001) in your browser.
20+
21+
After that, try open the commands shell of the node by running:
22+
```sh
23+
docker exec -it nuls-node /nuls/bin/cmd.sh
24+
25+
# Then get a list of available shell commands
26+
>> help
27+
```
28+
29+
To see the node logs run:
30+
```sh
31+
docker logs -f nuls-node
32+
```
33+
34+
All the data generated by the node is stored in the mounted volume `/tmp/nuls/data`.
35+
You can read more details about how to configure the client node container [here](https://hub.docker.com/r/nuls/client-node/).
36+
37+
## Building it from source code
38+
39+
### What you will need
540

641
* JDK 1.8
742
* Maven 3.3+
843
* Git 2.x
944
* IDE ( Optional )
1045

11-
## Getting Source
46+
### Getting source
1247

1348
```sh
1449
$ git clone https://github.com/nuls-io/nuls.git && cd nuls
1550
```
1651

17-
## Build Source
52+
### Building from source
1853

1954
Make sure the JDK version is 1.8
2055

@@ -26,8 +61,15 @@ Java version: 1.8.0_171, vendor: Oracle Corporation, runtime: /Library/Java/Java
2661
```
2762

2863
If the Java version is not 1.8, it is recommended to install and set it to version 1.8.
64+
In some linux distributions, the package `JavaFX` is not included as part of the `openjdk` package. You can get it installing the package `openjfx`:
2965

30-
Now,we can build the node.
66+
```sh
67+
apt-get update && \
68+
apt-get -y install \
69+
openjfx
70+
```
71+
72+
Now, we can build the node.
3173

3274
```
3375
$ mvn clean package
@@ -37,8 +79,9 @@ After the command is successfully executed, you can find the compilation result
3779

3880
> client-module/client/target/nuls-node.tar.gz
3981
40-
## Run Node
82+
### Running the node
4183

84+
Unpackage the binaries:
4285
```shell
4386
$ mvn clean package
4487
$ cd client-module/client/target
@@ -47,10 +90,9 @@ $ tar -zxvf nuls-node.tar.gz -C nuls-node
4790
$ cd nuls-node/bin
4891
```
4992

50-
- Using start.sh running the nuls process.
51-
- Using stop.sh stop the nuls process.
52-
- Using cmd.sh running the nuls shell.
53-
93+
- Use `./start.sh` to run the nuls process.
94+
- Use `./stop.sh` to stop the nuls process.
95+
- Use `./cmd.sh` to run the nuls shell.
5496

5597
## Use IDEA
5698

themes/nuls/languages/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ page:
2020
sidebar:
2121
docs:
2222
started: Getting Started
23-
overview: Guide
23+
overview: Running a node
2424
manual: Manual
2525

2626
protocol:

0 commit comments

Comments
 (0)