Run Dero daemon in docker


#1

Instruction to run Dero daemon in background and in docker:

1] For background better to use screen/tmux in linux and dettach .

2] Nohup method :

nohup ./derod-linux-amd64 &
nohup ./dero-wallet-cli-linux-amd64 --wallet-file wallet1 --rpc-server --password walletpassword &

3] For Docker :
Dero daemon
Pls download Dero nightly build from following link for docker support.
Dero docker linux binary
Nightly Sources with docker support

STEP 1] Create docker empty/scratch using following cmd:
tar cv --files-from /dev/null | docker import - empty

STEP 2] Copy Dero daemon docker-derod-linux-amd64 in /tmp/ folder.
cp ./docker-derod-linux-amd64 /tmp/

STEP 3] To start docker docker container use following cmd:
docker run -d -i -w /tmp --mount type=bind,source=/tmp,destination=/tmp,consistency=cached --network host -t empty /tmp/docker-derod-linux-amd64

STEP 4] See following cmds to attach/detach Dero docker to console:
docker attach containerid // Note containerid from STEP 2.
To detach from container press Ctrl-P Ctrl-Q

To build Dero daemon docker image from scratch see following:


STEP 1] Copy Dero daemon docker-derod-linux-amd64 in currrent directory

STEP 2] Create “Dockerfile” containing following 3 lines.

FROM scratch
ADD ./docker-derod-linux-amd64 /
ENTRYPOINT ["/docker-derod-linux-amd64"]

STEP 3] Run following cmd in currrent directory :
docker build --tag derod .

STEP 4] Run following cmd to start :
docker run --network host derod

Dero running in docker.

Dero wallet in docker
STEP 1] Create docker empty/scratch using following cmd:

tar cv --files-from /dev/null | docker import - empty

STEP 2] Copy Dero wallet binary docker-dero-wallet-cli-linux-amd64 in /tmp/ folder.

cp ./docker-dero-wallet-cli-linux-amd64 /tmp/

STEP 3] Create a Dero wallet on host system with some password(It cannot be empty).

STEP 4] Copy wallet.db created from STEP 3

cp ./wallet.db /tmp/

STEP 5] Create “Dockerfile” containing following 4 lines.

FROM scratch
ADD ./docker-dero-wallet-cli-linux-amd64 /
ADD ./wallet.db /
ENTRYPOINT ["/docker-dero-wallet-cli-linux-amd64", "--password=123","--unlock","--rpc-server","--rpc-bind=127.0.0.1:20209"] 

STEP 6] Run following cmd in currrent directory :

docker build --tag dero-wallet .

STEP 7] Run following cmd to start :

docker run --network host dero-wallet


Important Links