You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy llc on my synology NAS. I have mounted the folder /htdocs to an external folder (/Docker/llc). When I run the container, the folder /Docker/llc is empty.
Do I have to do something to copy all llc files to my external target folder ?
When following the steps described in the README, the files should have been copied over, already.
The problem is I'm probably not the best one to help you troubleshoot this issue, I've just started out with docker and don't know all too much about it.
You might be able to find someone who can help on the DBtech or our community Discord:
I have mounted the folder /htdocs to an external folder (/Docker/llc). When I run the container, the folder /Docker/llc is empty.
Any time you mount something (file or folder) to an existing one within a container, the local file/folder overwrites the one within the container (technically the one within the container still exists as a different layer, but it's "invisible").
in other words. mounting an empty /Docker/llc to the /htdocs within the container, essentially "empties" the contents of the stuff in /htdocs. You can drop a test file in /Docker/llc and you'll see it show up in /htdocs.
Do I have to do something to copy all llc files to my external target folder ?
You have to copy out the stuff from the /htdocs folder within the container first, into your /Docker/llc and then when you mount it again, the htdocs folder will have a "clone" of what was in it.
I forget offhand, and am too lazy atm to look it up ;) but I think I recall the readme showing how to do a quick copy of the htdocs folder the first time you run it using a docker run command. If not, a quick docker cp will do it.
Btw, really, you don't need to copy the entire contents of the htdocs folder (and probably shouldn't). It's enough to just copy out and then mount any files or folders you will customize. These are the only things that I mount in mine:
Hi, stumbled over the same issue today and would like to add my 2 cents to the disccusion:
I saw in some similar images (where a whole folder should be volume, that also includes application data) that the necessary data is created on first run, if the entrypoint detects that the folder is empty. Maybe this would make sense here.
@STaRDoGG Does your list include also everything the user configures via UI? Or should I use the list from the Readme for full persistence?
In the Readme file it is recommended to mount the whole /htdocs folder, but the docker compose example does mount single files.
I saw in some similar images (where a whole folder should be volume, that also includes application data) that the necessary data is created on first run, if the entrypoint detects that the folder is empty. Maybe this would make sense here.
I agree, it is a very nice convenience when the container auto-populates necessary files in mounts. A lot of container authors will add a small bash script to check on startup whether they exist and if not, copy them over. There are source code examples out there; in fact I just saw one recently, but forget where I saw it, and didn't bookmark.
@STaRDoGG Does your list include also everything the user configures via UI? Or should I use the list from the Readme for full persistence?
As far as I can tell from my own usage so far, the files that I mentioned are the only ones that get changed via the UI, but @JulianPrieber is the expert to ask on that one (it's his project =).
In the Readme file it is recommended to mount the whole /htdocs folder, but the docker compose example does mount single files.
That would work fine; I personally like to only mount files that change (my own customizations/settings), since there's no other need generally to store a bunch of files that either never change, or I have no control over. I prefer to leave those in the container. It also lessens a bit of potential confusion when looking through files for something, and obviously hard drive clutter, and space, especially when using a smaller SSD. It also makes a bit more sense for container portability to leave as much inside the container as possible.
* I saw in some similar images (where a whole folder should be volume, that also includes application data) that the necessary data is created on first run, if the entrypoint detects that the folder is empty. Maybe this would make sense here.
Definitely would love to see this added to this project. Just another nice quality of life improvement for the project. Unfortunately I am not docker literate enough to help out with this.
I agree, it is a very nice convenience when the container auto-populates necessary files in mounts. A lot of container authors will add a small bash script to check on startup whether they exist and if not, copy them over.
Activity
JulianPrieber commentedon Oct 9, 2022
Hey @malves,
When following the steps described in the README, the files should have been copied over, already.
The problem is I'm probably not the best one to help you troubleshoot this issue, I've just started out with docker and don't know all too much about it.
You might be able to find someone who can help on the DBtech or our community Discord:
https://discord.gg/M9J6hFq
https://discord.littlelink-custom.com
jscottelblein commentedon Oct 14, 2022
Any time you mount something (file or folder) to an existing one within a container, the local file/folder overwrites the one within the container (technically the one within the container still exists as a different layer, but it's "invisible").
in other words. mounting an empty
/Docker/llcto the/htdocswithin the container, essentially "empties" the contents of the stuff in/htdocs. You can drop a test file in/Docker/llcand you'll see it show up in/htdocs.You have to copy out the stuff from the
/htdocsfolder within the container first, into your/Docker/llcand then when you mount it again, the htdocs folder will have a "clone" of what was in it.I forget offhand, and am too lazy atm to look it up ;) but I think I recall the readme showing how to do a quick copy of the htdocs folder the first time you run it using a
docker runcommand. If not, a quick docker cp will do it.jscottelblein commentedon Oct 14, 2022
Btw, really, you don't need to copy the entire contents of the htdocs folder (and probably shouldn't). It's enough to just copy out and then mount any files or folders you will customize. These are the only things that I mount in mine:
the
.envandadvanced-config.phpcontain your config, and theimgfolder retains any image changes (avatar, etc.).jan-di commentedon Oct 21, 2022
Hi, stumbled over the same issue today and would like to add my 2 cents to the disccusion:
/htdocsfolder, but the docker compose example does mount single files.jscottelblein commentedon Oct 27, 2022
I agree, it is a very nice convenience when the container auto-populates necessary files in mounts. A lot of container authors will add a small bash script to check on startup whether they exist and if not, copy them over. There are source code examples out there; in fact I just saw one recently, but forget where I saw it, and didn't bookmark.
As far as I can tell from my own usage so far, the files that I mentioned are the only ones that get changed via the UI, but @JulianPrieber is the expert to ask on that one (it's his project =).
That would work fine; I personally like to only mount files that change (my own customizations/settings), since there's no other need generally to store a bunch of files that either never change, or I have no control over. I prefer to leave those in the container. It also lessens a bit of potential confusion when looking through files for something, and obviously hard drive clutter, and space, especially when using a smaller SSD. It also makes a bit more sense for container portability to leave as much inside the container as possible.
beefstew809 commentedon Nov 12, 2022
Definitely would love to see this added to this project. Just another nice quality of life improvement for the project. Unfortunately I am not docker literate enough to help out with this.
jscottelblein commentedon Nov 21, 2022
Have a look at this function:
https://github.com/kerberos-io/kerberos-docker/blob/a48f59446fd3b77f193b9c0bac76208dd6c8f6aa/run.sh#L14
JulianPrieber commentedon Nov 21, 2022
I will count this one as solved and convert it into a discussion.