How to turn my docker file to a docker folder?


NLS

Recommended Posts

Never tried it myself, but from what I understand, you would have to

  • stop your docker service in Settings
  • delete the image
  • set Docker data-root to directory
  • maybe select the FS you want ?
  • restart the Docker service
  • probably reinstall all your dockers from Previous Apps

We will see what the experts say and how far I am from the truth. :) 

Link to comment
1 hour ago, ChatNoir said:

Never tried it myself, but from what I understand, you would have to

  • stop your docker service in Settings
  • delete the image
  • set Docker data-root to directory
  • maybe select the FS you want ?
  • restart the Docker service
  • probably reinstall all your dockers from Previous Apps

We will see what the experts say and how far I am from the truth. :) 

 

I already did something like that and it didn't work.

When I pointed to a folder instead of the img file, it just turned red (that it doesn't exist).

 

Link to comment
4 minutes ago, Squid said:

Apps - Previous Apps.  Check off what you want.  No need to do them individually

Yeah but i wanted to test a few. Also i have a few hosted on my own docker repo etc etc.

But most of them done as you mentioned. Working on the last few of my own custom dockers now and all seems good.

Advantage is that now with my zfs backups (send/recieve) that now also include the core docker images etc i have more granular control over the content when needed for more complex restore scenarios etc

Link to comment

Just an observation and fyi :

On ZFS it creates a separate dataset for each docker image that is pulled. So now i have 431 extra datasets if i do a 'zfs list' .

Also snapshotting/send/recieve becomes a pain, but i think of not doing that for the docker datasets as can always pull fresh images if needed.

Maybe just a few where there is a tight and critical relation between image versions and appdata content that needs to be in sync. But the rest i will forget about.

But for total granular control, it of course great.

 

image.thumb.png.3043b8901a1f05e5bd8f613e9f34aa7e.png

 

Edited by glennv
  • Haha 1
Link to comment
So can someone spell out the instructions?
Do I need the trailing slash?
 


0. Make a screenshots of you current docker tab (usefull for step 5 so you know the exact names of all your current installed docker templates )
1. Stop all dockers
2. In docker settings : Stop docker service
3. Rename the existing docker.img so you have a backup in case stuff does not go as you expect.
Also create a directory named docker at some location where you want your dockers to live now.
4. In Docker settings : change to directory mode and specify the target directory (add trailing slash or use the picker to select your previously created docker directory where you want your docker images to live. ) and start the docker service again.
5. Under your docker tab you should have now nothing, as expected. Go to the app's > previous apps and reinstall all your old dockers. Be carefull when picking from that list as all your old attempts / tempates etc will be there as well. So use the list from step 0 as reference.

Remark:
This assumes that you have all your docker persistant data somewhere else (eg in appdata etc) as all data not in these persistant locations will be wiped by a reinstall of the docker images. The same behavior when you upgrade your docker to a new version for example. So if your upgrades typicaly work fine this will also work fine.
This is normal behavior and you as good practice should never have data living inside your docker that is not captured on a persistant location. Unless its temporary not required data of course.
  • Like 2
Link to comment
  • 2 months later...
On 3/15/2021 at 12:42 PM, glennv said:

0. Make a screenshots of you current docker tab (usefull for step 5 so you know the exact names of all your current installed docker templates )
1. Stop all dockers
2. In docker settings : Stop docker service
3. Rename the existing docker.img so you have a backup in case stuff does not go as you expect.
Also create a directory named docker at some location where you want your dockers to live now.
4. In Docker settings : change to directory mode and specify the target directory (add trailing slash or use the picker to select your previously created docker directory where you want your docker images to live. ) and start the docker service again.
5. Under your docker tab you should have now nothing, as expected. Go to the app's > previous apps and reinstall all your old dockers. Be carefull when picking from that list as all your old attempts / tempates etc will be there as well. So use the list from step 0 as reference.

 

 

Thank you for these directions. Super easy! All (34?) of my containers started up without a problem.

  • Like 1
Link to comment
  • 4 months later...

I can't seem to find an 'official' guide on how this is all done, I thought I'd add this from what I've seen/experienced:

 

  1. Make a screenshot of you current docker tab (useful for step 5 so you know the exact names of all your current installed docker templates )
  2. Stop all containers
  3. If you use any custom docker networks/subnets keep all that info handy.
    - You can get the list of current docker networks using this command: docker network ls
    - You can get the details of the custom docker network using this command: docker network inspect <NameOfNetwork>
  4. In Settings>Docker : Stop the docker service
  5. Rename the existing docker.img so you have a backup in case stuff does not go as you expect.
    - Also create a directory named docker at some location where you want your dockers to live now.
  6. In Settings>Docker : change to directory mode and specify the target directory (add trailing slash or use the picker to select your previously created docker directory where you want your docker images to live.)
    - If you didn't create the directory in Step 4, it'll create a folder under the current one (/mnt/user/system/docker/docker/)
  7. In Settings>Docker: Start the docker service
  8. If you used any custom docker networks you can recreate it now (obviously replace subnet to match whatever yours was).
    - Use this command to recreate your custom docker network: docker network create --subnet=172.18.0.0/16 <NameOfNetwork>
  9. Under your docker tab you should have now nothing, as expected. Go to Apps>Previous Apps>Docker, select all using the option on the bottom (or only check the ones you want installed), and select Install Selected Items to reinstall all your old dockers.
    - Be careful when picking from that list as all your old attempts /tempates etc will be there as well. So use the list from step 0 as reference.
  10. If any containers have issues starting up, a reboot of the system at this point can help get them going.
Edited by God_TM
Cleaning it up
  • Like 1
Link to comment
  • 8 months later...
16 minutes ago, BigDanT said:

Hi,

 

can someone explain the benefits of doing this rather than having a docker image ??

 

cheers

 

D.

 

Well it all depends.

What made me move to a folder structure?

 

1) Ease of accessing the contents.

 

No worries about the size that I need to manage manually, which works two ways:

2) I don't have to worry that the image is small for the wealth of my containers and their "residue".

3) I don't feel I have limited the ability of my cache to expand as much as possible and have dead space in the docker image.

 

4) Could be (debatable) faster to access, as there is one less filesystem "level" and one less level of fragmentation, overhead etc.

 

Is it something magic, that everybody should do? No.

 

Link to comment

maybe this will fix my database issues across dockers.

 

I have multiple dockers with their appdata spread across the Appdata share on the cache and a seperate "Unassigned drive".

 

And im having multiple database corruptions across these dockers. 

 

 

..... its a shitemare !

Link to comment
4 hours ago, trurl said:

Better to put that UD as another pool. Are you mapping that UD appdata slave mode?

Hi,

 

Yes the UD is mapped as slave mode.

 

Whats the benefit of making it a separate Pool (of 1 drive) from the Cache drive ?

 

In a nutshell I use the standard "Appdata" share for Radarr, Sonarr & Tautulli & a seperate UD drive for my Plex Metadata / Database / appdata.

 

Im getting regular malformed db errors across all applications on both disks.

 

Any recommendations would be ace. this has only started since updated to 6.10.3 I ran my server as is for 2 years with no problems.

 

I even changed all my appdata references in docker to "/mnt/cache/appdata/radarr/" refernece cache rather than user, as i read that can fix this problem, but it didnt help.

 

My DB's are corrupting almost weekly at this point.

Link to comment
  • 3 months later...
  • 3 months later...

For the docker directory: Should it be associated to a share or to a disk or is it irrelevant? 

 

I have the docker.img and appdata in the certain shares on a specific pool. When I want to change from docker.img to file: Should I put the directory of the docker-share or the disk on which the docker-directory will sit in? 

 

A) /mnt/disk_pool_name/docker_files

B) /mnt/user/system/docker/docker_files

 

Edit: Share of course set to useCache:ONLYdriveA

Edited by Kazino43
Link to comment
5 minutes ago, Squid said:

One key though is that you would want the share to be ideally useCache: ONLY.

One thing that occurred to me is whether the text for that setting should be changed to "Use Pool" and then the current Yes setting changed to read "Cache" so that the possibilities become "No, "Cache", "Prefer", "Only".  I think that might dramatically reduce the number of users who misunderstand that setting?  What do you think?

Link to comment
13 minutes ago, itimpi said:

One thing that occurred to me is whether the text for that setting should be changed to "Use Pool" and then the current Yes setting changed to read "Cache" so that the possibilities become "No, "Cache", "Prefer", "Only".  I think that might dramatically reduce the number of users who misunderstand that setting?  What do you think?

 

Yeah,

 

2 ways of doing that.  Either changing the text  "Mover transfers files from cache to array" to instead be "Mover transfers files from pool to array" in the code, or changing the en_US master translation file from

Mover transfers files from cache to array=

to instead be

Mover transfers files from cache to array=Mover transfers files from pool to array

 

1st method requires every language to be updated to reflect the change which is a PITA for such a minor change

2nd method keeps all of the existing translations in place, but would update the English description shown in the GUI

 

Personally, I'd do #2, but it's up to @bonienl

 

(System already says "Use Pool" and not "Use Cache", but the text description for what mover does is incorrect)

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.