This is a simple setup to mine ethereum for nicehash within docker on a linux host. The docker container runs the miner using the nvidia-docker
runtime to allow for cuda usage, and the script+crontab ensure it stays running. The latter is necessary because sometimes the miner encounters errors but will not exit, so restart: on-failure
is insufficient.
To use, enter your address and worker name in the docker-compose.yaml
, put the crontab into your crontab, and the script in the correct location. Ensure the base image for your Dockerfile matches the CUDA version on the host. Last, you want to download and extract the latest release of ethminer
and place the ethminer
executable and kernels
folder in the working directory when building the Dockerfile. This keeps the image size down by not including the deps needed to do so within the container.