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

Hostfs mouting issue (-v /:/mnt/hostfs) #785

Closed
reliveyy opened this issue Nov 15, 2020 · 2 comments
Closed

Hostfs mouting issue (-v /:/mnt/hostfs) #785

reliveyy opened this issue Nov 15, 2020 · 2 comments
Assignees
Labels
tbd To Be Discussed

Comments

@reliveyy
Copy link
Collaborator

reliveyy commented Nov 15, 2020

Known issues when we try to map the whole hostfs into one contianer with -v /:/mnt/hostfs

$ cd /tmp
$ echo 1 > a
$ ln -s $PWD/a b
$ docker run -it --rm --entrypoint cat -v /:/mnt alpine /mnt/tmp/b
cat: can't open '/mnt/tmp/b': Permission denied
  • Read-write permission too wide for container usage (It's not normal to map "/" into contianers);
  • Cannot work on Windows without WSL2 (For more details, see this SO question);
  • Performance issue.
@reliveyy
Copy link
Collaborator Author

And I came up with 3 solutions:

  1. Use docker run -it --rm -v /any/path:/mnt:ro alpine to check any files on host. But it's not perfect becuase it will create an empty folder if it doesn't exist on host. And it cannot handle links properly too.

  2. Write a custom Docker volume driver (too ambitious and not 100% sure)

--mount 'type=volume,src=/,dst=/mnt/hostfs,volume-driver=mydriver,volume-opt=key1=value1,volume-opt=key2=value2'
  1. Change utils container as a native launcher so it will has direct access the whole host filesystem by default.

@ghost ghost added the tbd To Be Discussed label Nov 16, 2020
@ghost ghost assigned ghost and reliveyy Nov 16, 2020
@kilrau
Copy link
Contributor

kilrau commented Nov 16, 2020

As just discussed, closing here in favor of the only remaining thing left: #757

  • The macOS FUSE issue

Has separate issue: #756

  • Link file breaks on Linux (This happens on RaspiBlitz);

Edge case, we'll ignore this until it becomes an issue.

  • Read-write permission too wide for container usage (It's not normal to map "/" into contianers);

Separate issue: #786

We'll enforce WSL2 from now on (ExchangeUnion/xud-ui#96).

  • Performance issue.

We'll ignore this one too until it becomes an issue.

@kilrau kilrau closed this as completed Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tbd To Be Discussed
Projects
None yet
Development

No branches or pull requests

2 participants