Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow persistent data for container #9

Merged
merged 23 commits into from
May 22, 2021
Merged

Allow persistent data for container #9

merged 23 commits into from
May 22, 2021

Conversation

m1k1o
Copy link
Owner

@m1k1o m1k1o commented May 19, 2021

This PR is adding functionality to mount folders to containers. User's path root will be changed to custom container folder in instance data folder: <instance.data>/<container.name>/<users.path>.

To do

  • When folder does not exist, it creates with root:root user, and is not accessible for neko user inside container.
    • Switched to mounts instead of binds, target folder must exist now. (changed in 0e99dd5)
  • Path root can be bypassed easily with adding /../ to path. (fixed in 1345118)

@m1k1o
Copy link
Owner Author

m1k1o commented May 20, 2021

Should mount /data folder to neko-rooms and create new folder before mounting. That would need two paths for data:

  • one inside cointainer
  • another on the host

They need to match, otherwise it won't work.

@m1k1o
Copy link
Owner Author

m1k1o commented May 21, 2021

Neko rooms is running as root (even if only inside container), although it does not need to. And creatilg file results again to a file owned by root.

@m1k1o
Copy link
Owner Author

m1k1o commented May 22, 2021

There should be posibility to add readonly template files from a shared directory, rather that having everything split per rooms. And additionaly allow whitelisted external mounts (for downloads folder, or media...).

@m1k1o
Copy link
Owner Author

m1k1o commented May 22, 2021

Maybe neko-rooms could copy its data mountpoint information (since it has access to docker socket) and use that, instead of setting another external env variable. Update: Needs refactoring, new PR.

@m1k1o m1k1o marked this pull request as ready for review May 22, 2021 18:00
@m1k1o m1k1o merged commit a024f8f into master May 22, 2021
@m1k1o m1k1o deleted the persistent-data branch June 5, 2021 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant