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

[learning LXD] Better way of sharing directories #2

Closed
sparkiegeek opened this Issue Feb 5, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@sparkiegeek
Copy link

sparkiegeek commented Feb 5, 2019

The fundamental issue with sharing directories is having the kernel know that you're really the same user.

The preferred, and easy way to do this is to setup a mapping of userids from the host to the container.

$ lxc launch ubuntu:bionic example-container-c raw.idmap="both $UID 1000"
...
$ lxc config device add example-container example-share disk source="/path/to/directory/to/share" path=/home/ubuntu/whatever
@nottrobin

This comment has been minimized.

Copy link
Owner

nottrobin commented Feb 5, 2019

@sparkiegeek sorry, did you say that this actually won't work in a default LXD install?

@sparkiegeek

This comment has been minimized.

Copy link
Author

sparkiegeek commented Feb 5, 2019

@nottrobin yes, sorry got distracted.

https://blog.ubuntu.com/2016/12/08/mounting-your-home-directory-in-lxd

covers the changes needed to /etc/subuid and /etc/subgid

@nottrobin nottrobin closed this in ffabe7e Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.