Skip to content

Commit 9903a05

Browse files
iotaskzjshen14
authored andcommitted
docker beginners guide (#4)
1 parent d89b362 commit 9903a05

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
.idea
1+
.idea
2+
data/
3+
etc/
4+
log/

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,22 @@ and private key and uncomment the lines. Check the following [section](#ioctl) f
3030
3. Export `IOTEX_HOME`, create directories, and copy `config.yaml` and `genesis.yaml` into `$IOTEX_HOME/etc`.
3131

3232
```
33-
export IOTEX_HOME=[SET YOUR IOTEX HOME PATH HERE]
33+
cd iotex-testnet
34+
35+
export IOTEX_HOME=$PWD #[SET YOUR IOTEX HOME PATH HERE]
3436
3537
mkdir -p $IOTEX_HOME/data
3638
mkdir -p $IOTEX_HOME/log
3739
mkdir -p $IOTEX_HOME/etc
40+
41+
cp config.yaml etc/
42+
cp genesis.yaml etc/
3843
```
3944

4045
4. Run the following command to start a node:
4146

4247
```
43-
docker run -d \
48+
docker run -d --name IoTeX-Node\
4449
-p 4689:4689 \
4550
-p 14014:14014 \
4651
-p 8080:8080 \
@@ -90,6 +95,39 @@ ioctl node delegate
9095

9196
Refer to [CLI document](https://github.com/iotexproject/iotex-core/blob/master/cli/ioctl/README.md) for more details.
9297

98+
## Checking node log
99+
100+
Container logs can be accessed with the following command.
101+
102+
```
103+
docker logs IoTeX-Node
104+
```
105+
106+
content can be filtered with:
107+
108+
```
109+
docker logs -f --tail 100 IoTeX-Node |grep --color -E "epoch|height|error|rolldposctx"
110+
```
111+
112+
## Stop and remove container
113+
114+
When starting the container with ```--name=IoTeX-Node```, you must remove before a new building
115+
116+
```
117+
docker stop IoTeX-Node
118+
docker rm IoTeX-Node
119+
```
120+
121+
## Pause and Restarting container
122+
123+
Container can be "stopped" and "restarted" with:
124+
125+
```
126+
docker stop IoTeX-Node
127+
docker start IoTeX-Node
128+
```
129+
130+
93131
## Fast Sync
94132

95133
IoTeX rootchain supports bootstrapping from archives (see below) which will greatly help to reduce the time spent on synchronization.

0 commit comments

Comments
 (0)