HUB
Sign inSign up

klutchell/ethminer-cpp

By klutchell

•Updated over 9 years ago

added miner support to ethereum/client-cpp:alpine docker image

Image
1

2.0K

klutchell/ethminer-cpp repository overview

⁠ethminer-cpp docker image

⁠Description

These docker images include the official development cpp-ethereum linux binaries to provide ethminer support.

While there are forks of ethminer that are focused on GPU mining, I wanted to try my hand at CPU mining even though it is not recommended nor profitable. I also wanted to use the official cpp-ethereum source if possible.

These images also include eth so they could be run as a client/wallet, but for that I would recommend the official ethereum/client-cpp⁠ images since they are smaller and better supported.

⁠Tags

tagdescription
latestsame as alpine
alpinelatest alpine base image and cpp-ethereum development source
ubuntulatest ubuntu base image and cpp-ethereum development source

⁠Basic Usage

Create some local directories for ethereum data so a new DAG isn't required on every start (optional).

$ mkdir ~/.ethereum ~/.ethash ~/.web3

Run container with .ethash volume mount and other recommended parameters for ethereum/client-cpp docker images⁠.

$ docker run -it --rm \
--name ethminer-cpp \
-p 127.0.0.1:8545:8545 \
-p 0.0.0.0:30303:30303 \
-v ~/.ethereum:/.ethereum \
-v ~/.ethash:/.ethash \
-v ~/.web3:/.web3 \
-e HOME=/ \
--user $(id -u):$(id -g) \
klutchell/ethminer-cpp <options>

If running in detached mode, you can view the logs with the following command:

$ docker logs -t ethminer-cpp

⁠Bash Script

You can optionally also use the provided bin/docker-ethminer bash script to start/stop the service on a schedule. Edit the volume mounts and mining parameters as needed before running the script.

⁠Docker Stack

You can optionally also use the provided docker-compose.yml for running as a service either with docker-compose or docker swarm. Edit the volume mounts and entrypoint as needed before creating stack.

⁠Create Stack

Create a new stack with the

$ docker stack deploy --compose-file docker-compose.yml miner
⁠Update Stack

The same deploy command will pull the latest image and update the container as needed.

$ docker stack deploy --compose-file docker-compose.yml miner
⁠Remove Stack

This will stop the miner and remove the stack.

$ docker stack rm miner
⁠Stop Mining

This will stop the ethminer-cpp service.

$ docker service scale miner_ethminer-cpp=0
⁠Start Mining

This will start the ethminer-cpp service.

$ docker service scale miner_ethminer-cpp=1

⁠Sources

⁠Documentation

Tag summary

Content type

Image

Digest

Size

686.8 MB

Last updated

over 9 years ago

docker pull klutchell/ethminer-cpp