How to set docRoot? #4
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Griefed/docker-ICEcoder#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: derekoharrow
Great image - works well!
I'm trying to figure out how to set the root for the IDE though. It seems to default to /app/ICEcoder. You can then set a subfolder of that as your root, but how do you change it from /app/ICEcoder to something else?
Thanks
Yep, you're correct. I misinterpreted the way ICEcoder handles the file manager. The highest you can go with it is /app/ICEcoder. No wonder no directories or files show up when I set it to
/griefedeven though I've mounted a folder to said location and put a testfile in it. I honestly believed you could set the file manager to any directory. Huh.So, the way I see it, there are two solutions to this, one of which is a workaround and not permanent.
1: Workaround, symlinking the mounted directory to /app/ICEcoder/, won't survive container recreation
path/on/host:/derekoharrowdocker exec -it icecoder /bin/bashln -s /derekoharrow /app/ICEcoder/derekoharrow/derekoharrowFiles and directories will not be touched by the ownership and permission scripts which are executed when starting the container, but you will have access to your files in the directory.
2: Customize the image
root/etc/cont-init.d/61-configand add the following::/derekoharrow/derekoharrowThe symlink now always exists but the files aren't touched be ownership or permission checks as inside /app/ICEcoder/derekoharrow is just a symlink and chown -R doesn't follow it, neither does chmod -R.
Would this help?
Cheers,
Griefed
Created by: derekoharrow
Thanks, but the setting of ownership causes me problems as it tries to set the owner on thousands of files, which can cause problems with other containers and takes ages to start up.
Ideally, I'd like to have another folder under there that I can mount for editing files. I suspect that would mean changing your startup scripts.
I'll probably implement the suggestion as a change to the directory where the, if specified, git repo will be cloned to, the one specified with
-e GITURL=https://github.com/icecoder/ICEcoder.git👍Glad I could help you out. 🙂 I'll close this issue. If you have further suggestions either reopen or create a new issue.
Stay safe and healthy, take care.
Cheers,
Griefed
Created by: derekoharrow
I've tried this and while the mount point is visible within the container, it doesn't show up in ICEcoder at all as it's not under the docRoot /app/ICEcoder
In that case, you could try mounting a volume like
path/to/derekoharrow:/derekoharrow, set the permissions and ownership once and use that folder going forward. Since it's mounted, it's not lost when recreating the container and as it's not touched by the container configuration, it doesn't impact startup time.Finally got around to implement, test, push etc. etc. your suggestion! 🙂
It's now available via the
latest-tag. I've changed the way the/codedirectory is handled and it can now be safely used as your file manager root directory. It shouldn't slow down container start anymore as the permission passes don't affect it during container start.Let me know if anything else pops up!
Cheers,
Griefed
Hey there derekoharrow,
thanks for your question. 🙂

I've just tested it with the /code directory, which is not a subfolder of /app/ICEcoder and it seems to work just fine.
So, if I understand you correctly, you don't need to specify a subfolder of ICEcoder, but can instead choose any directory in the container. That directory should be either one of the directories specified in the deployment section, or a subfolder of these. The reason for that being that these directories have their permissions and ownership set everytime the container starts, ensuring file access between host and container.
That being said, you could set your file manager root to
/code/derekoharrowas an example. Note: Testing showed that you need to create the directory either via CLI or in ICEcoder, otherwise the right-click context menu won't work for some strange reason, and therefor not allow you to create files.Hope this helps.
Cheers,
Griefed
Created by: derekoharrow
Thanks for coming back to me.
(1) definitely works and I can use this temporarily.
Could I suggest that you update your image for (2) - perhaps adding a mount point of /src which could then be linked as you suggest?
I don't mind copying and modifying your image, but it sounds like a useful improvement to yours that others could benefit from too.
Thanks for your help!