steem icon indicating copy to clipboard operation
steem copied to clipboard

how to replay block_log after running steem in docker

Open lidinghi opened this issue 5 years ago • 2 comments

This question may be basic. But I couldn't find materials that can guide me through.

I have pulled a steemit/steem image using docker and had it run using the following command

sudo docker run \
    -d -p 2001:2001 -p 8090:8090 --name steemd-simple  \
    steemit/steem

However, I couldn't figure out how to replay the block_log as mentioned here.

If I understand correctly, I should run some command like this in the terminal

steemd --data-dir=. --replay-blockchain

However, when I type steemd in the command line, it says steemd: command not found

My guess is that I should use docker exec to run the command. Something like this, sudo docker exec -it steemd-simple /bin/sh/steemd Then, It returned the following error OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh/steemd\": stat /bin/sh/steemd: not a directory": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Please show me some guidance on how to replay block_log and the use of steemd!

lidinghi avatar Aug 22 '20 06:08 lidinghi

You need to prepare block_log file first.

Suppose you have downloaded the latest block_log file in the folder /data/steem.

Then you startup the container by this command

sudo docker run \
    -d -p 2001:2001 -p 8090:8090 --name steemd-simple  \
    -v /data/steem:/var/lib/steemd/blockchain \
    steemit/steem

ety001 avatar Aug 24 '20 07:08 ety001

Start the container and get a shell prompt inside the container using: sudo docker exec -it steemd-simple /bin/bash When you are inside the container, install the steemd command using : apt-get update && apt-get install -y steem Once the installation is complete, you can replay the block_log using the command: steemd --data-dir=/var/lib/steemd --replay-blockchain Hope it helps

SteveParadox avatar May 06 '23 02:05 SteveParadox