Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to replay block_log after running steem in docker #3657

Open
lidinghi opened this issue Aug 22, 2020 · 2 comments
Open

how to replay block_log after running steem in docker #3657

lidinghi opened this issue Aug 22, 2020 · 2 comments

Comments

@lidinghi
Copy link

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!

@ety001
Copy link
Member

ety001 commented Aug 24, 2020

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

@SteveParadox
Copy link

SteveParadox commented May 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants