Jump to content

How to enable docker without having the containers I have set to auto-run, run?


Recommended Posts

/var/lib/docker/unraid-autostart

 

Which is inside the docker.img file, so if that's not mounted you will need to manually mount it to make the edit. Or you can just delete the docker.img file and recreate it, you will need  to recreate any custom networks before restoring all you containers with the previous apps section of CA. It only takes a few minutes, and you won't lose any data as long as your containers are properly mapped to appdata.

  • Like 1
Link to comment
  • 9 months later...
Posted (edited)

To add some more specific details/steps to this; here's what I did just now (Ref) :

  • Made a backup of the `docker.img` file, just in case

  • Mounted the `docker.img`, and removed the containers from autostart:

    • /mnt# mkdir /mnt/docker_img
      
      /mnt# mount -o loop /mnt/disk6/TempDumpBackups/docker.img /mnt/docker_img
      
      /mnt# cd /mnt/docker_img/
      
      /mnt/docker_img# ls
      btrfs/    buildkit/    containers/  image/    plugins/   swarm/  trust/   unraid-autostart           volumes/
      builder/  containerd/  engine-id    network/  runtimes/  tmp/    unraid/  unraid-update-status.json
      
      /mnt/docker_img# file unraid-autostart
      unraid-autostart: ASCII text
      
      /mnt/docker_img# cat unraid-autostart
      this
      has
      a
      list
      of
      autostart
      docker
      containers
      
      /mnt/docker_img# cp unraid-autostart unraid-autostart.bkup
      
      /mnt/docker_img# echo "" > ./unraid-autostart
      
      /mnt/docker_img# cd /mnt
      
      /mnt# umount /mnt/docker_img

       

  • Set 'Unraid -> Settings -> Docker -> Enable Docker' to 'Yes'

  • Made the changes I needed to make:

    • On the 'Docker' tab, for each container, checked/updated any mappings directly on `/mnt/cache/*` (eg. `/mnt/cache/appdata`) and updated them to `/mnt/cache_250gb/*` (eg. `/mnt/cache-250gb/appdata`), clicked 'Apply' (since 'Save' doesn't seem to update the mappings in the Unraid Web UI), then manually stopped the container again.

  • Set 'Unraid -> Settings -> Docker -> Enable Docker' to 'No'

  • Mounted the `docker.img`, and restored the previous autostart containers:

    • /mnt# umount /mnt/docker_img
      
      /mnt# mount -o loop /mnt/disk6/TempDumpBackups/docker.img /mnt/docker_img
      
      /mnt# cd /mnt/docker_img/
      
      /mnt/docker_img# rm unraid-autostart
      
      /mnt/docker_img# mv unraid-autostart.bkup unraid-autostart
      
      /mnt/docker_img# cd ..
      
      /mnt# umount /mnt/docker_img
      
      /mnt# rm -r /mnt/docker_img/

       

Edited by devalias
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...