Docker Mount file to replace file in docker.img


Aidzer0
Go to solution Solved by Squid,

Recommended Posts

Hello fellow Unraiders! 

 

For the past 2 weeks I have been installing lots of Docker containers and tinkering as I do, with that comes some struggle, I am trying to achieve a rather simple task of changing either favicon.png or logo.png that is located in the containers root files per website, through other docker hosts this seems easy, but since Unraid places all container images in docker.img, this is rather complicated. Is there a way for me to achieve this the replacement of these .png's? Or is there something I am completely missing?

 

I have tried mounting the .png files as a path, but since I cannot view the docker.img folder structure I am doing this blindly... and its not working haha. 

This is an example of what I am trying to do:

 -v '/mnt/user/appdata/searxng.png':'/searx/static/themes/simple/img/searxng.png':'rw' 'searxng/searxng'

 

Thank you.

Link to comment
2 minutes ago, BRiT said:

Your difficulties are not because of the docker.img. Docker.img is mounted like a filesystem so just browse to where it's mounted. There is even an option to use a directory instead of a mounted image.

 

 

How would I browse the contents of docker.img though?

 

Is there another way that I can achieve the replacement of the .png files within the container filesystem?

 

Thanks!

Link to comment
  • Solution
34 minutes ago, Aidzer0 said:

How would I browse the contents of docker.img though?

 

Go to /var/lib/docker  That's where the image (or folder) ultimately resides

 

But you might find it easier to simply go to the console of the individual container via the webGUI rather than sorting out all of the various layers etc within the docker subsystem.

Link to comment
18 minutes ago, Squid said:

Go to /var/lib/docker  That's where the image (or folder) ultimately resides

 

But you might find it easier to simply go to the console of the individual container via the webGUI rather than sorting out all of the various layers etc within the docker subsystem.

Eureka!!! 

 

Okay, so I just mounted the whole folder with all of the icons/pngs and svgs to the one located in the container image. 

 

The way I found the path is exactly how you said I should, opened the container console through Unraid WebGUI and navigated to the /img/ folder (where the logos exist), copied that path and just added a new path in the container settings. 

 

This is so simple yet so gratifying to have finally figured out, thank you so much!!!!

 

 

EDIT: I was missing something very important and thats I can use Console in the container to view the containers folder and file paths. Now that I know this, there is nothing that can't stop me!! haha. Again, huge thanks for this simple solution.

Edited by Aidzer0
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.