寻求帮助:docker-compose持续清除daemon.json内容,导致故障

  • I have a physical machine installed with the OMV system, not using a virtual machine. The system versions are as follows: OMV 6.9.9-1 (Shaitan), Linux 6.1.0-0.deb11.13-amd64, docker-ce 5:24.0.7-1debian.11bullseye, docker-compose-plugin 2.21.0-1debian.11bullseye.

    Issue: My machine has an Nvidia GPU installed, and the drivers are installed correctly. Since my Docker setup requires GPU utilization, I modified /etc/docker/daemon.json as shown below to enable proper functionality:

    Code
    root@omv:~# cat /etc/docker/daemon.json 
    { 
      "data-root": "/var/lib/docker", 
      "runtimes": { "nvidia": { "path": "nvidia-container-runtime", 
      "runtimeArgs": [] 
      }
     }, 
      "default-runtime": "nvidia" 
    }

    However, whenever I modify or create a new yml file in the Compose file menu and save it, the system automatically clears the content I added in the daemon.json file. Even changing the file permissions to read-only doesn't work. This prevents Docker from starting and functioning when GPU utilization is required:

    Code
    root@omv:~# cat /etc/docker/daemon.json 
    { 
      "data-root": "/var/lib/docker" 
    }

    Hence, I'd like to know the reason behind this issue and what settings I need to apply to rectify it. Thank you!

  • chente

    Approved the thread.
    • Official Post

    Maybe this will help you

  • Under OMV | Services | Compose | Settings |Docker |Docker storage:


    What do you have for this setting?


    If it is NOT blank you are making a mistake.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • pcbcn

    Added the Label resolved
  • pcbcn

    Changed the title of the thread from “Seeking help: docker-compose consistently clearing daemon.json content, causing malfunction” to “寻求帮助:docker-compose持续清除daemon.json内容,导致故障”.
  • 谢谢gderf,谢谢版主chente,我把docker存储留空,问题似乎就解决了,自定义的daemon.json就不会再被compose修改了。

    • Official Post

    As the message on the docker storage field says, if you leave the dockerStorage field blank, it won't write /etc/docker/daemon.json - https://github.com/OpenMediaVa…se/40dockerconfig.sls#L37


    If you are leaving the field blank, post the output of: sudo omv-salt deploy run compose

    omv 7.7.3-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.2 | compose 7.4.4 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!