Installing docker in custom folder with daemon.json not working

  • I'm trying to install Docker to a custom folder rather at the default location of /var/lib/docker. The official Docker documentation says you can specify the default location by specifying data-root in the daemon.json file located /etc/docker/daemon.json. More info can be found here.


    In the OMV web-GUI the Docker storage field says "Leave blank to use custom /etc/docker/daemon.json." which I have done but Docker never seems to be able to install and start. Below is the contents of the daemon.json file:

    Code
    {
      "data-root": "/srv/dev-disk-by-label-DATA1/AppData/Docker"
    }

    However, specifying the new Docker installation path in the field as detailed in the guide here allows Docker to be installed and start up.

    50938529858_507f68cb7c_b.jpg


    Any idea what's going on here?

  • Leaving the box blank didn't work on the version of OMV I was running at the time of writing the post hence why I had to specify the full path manually. The good news is that it seems to working now, now that I've done a clean install of OMV to the latest version. The only change with the configuration is shared folder paths now use UUID's.


    Below are the steps I have taken to change the default path for Docker:

    1) I created a directory 'docker' at '/etc'

    2) I created a file daemon.json at '/etc/docker' and set permissions to that I could write to the file over a SFTP client

    3) I used a SFTP client on Windows to edit the file and entered the following:

    Code
    {  "data-root": "/srv/dev-disk-by-uuid-dceac721-a86b-4d95-9866-c79109fbe9ca/AppData/Docker"}

    4) I went to the web-GUI > OMV Extras > Docker, cleared the 'Docker Storage' field and clicked the 'Save' button.

    5) After the settings had been applied I clicked install

    6) Docker is successfully installed and running

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!