giansalex / monero-miner-docker

Monero Miner on Docker - Alpine :whale:
https://hub.docker.com/r/giansalex/monero-miner
MIT License
86 stars 34 forks source link

Not finding json files #7

Closed JamesM92 closed 3 years ago

JamesM92 commented 3 years ago

Hello, i'm trying to deploy this using docker-compose. it is deploying but when it does it keeps having errors saying it can't find several .jsn files.

[2021-08-17 01:42:49.789] unable to open "/xmr/config.json".
[2021-08-17 01:42:49.789] unable to open "/root/.xmrig.json".
[2021-08-17 01:42:49.789] unable to open "/root/.config/xmrig.json".
[2021-08-17 01:42:49.789] no valid configuration found, try https://xmrig.com/wizard

here is the code im using in my docker-compose.yml file

volumes:
  config:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /srv/dev-disk-by-label-Archive/portainer/Xmrig/_data/config/

services:
  xmrig:
    image: giansalex/monero-miner:latest
    container_name: xmrig2
    restart: always
    volumes:
      - config:/xmr/config/
    environment:
      - o=rx.unmineable.com:3333
      - u=ETH:0xcFEf314645xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.Vault
      - cpu-priority=0
      - c=/xmr/config/config.json
    command:
      - /xmr/xmrig
giansalex commented 3 years ago

Maybe you need to move environment values to command

  command: /xmr/xmrig -o=rx.unmineable.com:3333 -u= ....
JamesM92 commented 3 years ago

Looks like that was able to straighten it out, thank you.

For anybody else wanting a docker compose file here is the final version im using that is working.

(I'm using unminable as my pool)

services:
  xmrig:
    image: giansalex/monero-miner:latest
    container_name: xmrig
    restart: always
    ports:
      - 3333:3333
    command:
      - /xmr/xmrig
      - -orx.unmineable.com:3333
      - -uETH:0xcFEf314645xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.Vault
      - --cpu-priority=0