unraid/webgui

Feature Request: Switch from docker.img to docker directory (and vice versa) hassle free

Opened this issue · 0 comments

Hi,

there are many outdated guides outhere and new users that follow them along or older unraid builds that grew with the time (as mine) and missed to switch to the directory option.
As "Docker data-root"-method 'Directory' was long time ago implemented in unraid, there never were an option to easily switch from an docker.img to docker directory.

Now is the best time to tackle this issue. :-)

How it could look like to switch from docker.img to docker directory
Under "Settings" > "Docker" if 'Docker Directory' is selected, two checkboxes appears that asks:

  1. "Docker image with dockers inside found. Move dockers from image to docker directory?"
  2. "Docker Compose projects (also from Docker Compose Manager) found. Re-Register them after moving to docker directory?"

If selection 'Docker Directory', it triggers a script:

  • check for docker container inside docker.img
  • show checkbox 1
  • check for docker compose projects, also inside /boot/config/plugins/compose.manager/
  • show checkbox 2

If user hits checkbox 1 xor 2 and "Save Settings", it triggers another script:

  • Disable "Enable Docker" Seletion (to avoid corruptions)
  • Show status on webgui for the following actions:
  • Create a list of every previous docker image and docker compose project
  • Check for docker networks
  • Move docker images from docker.img to docker directory
  • Recreate networks
  • Re-Register everthing as it was before
  • Check for existence / Compare: Create a list of every NEW docker image and docker compose project

For "vice versa": repeat the steps but for moving from directory to docker.img

If successful / not successful:

  • Enable "Enable Docker" Seletion (to avoid corruptions)
  • Fire notification