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

how to share the pcloud mount with other containers #1

Open
milsanore opened this issue Jan 9, 2024 · 1 comment
Open

how to share the pcloud mount with other containers #1

milsanore opened this issue Jan 9, 2024 · 1 comment

Comments

@milsanore
Copy link

tl;dr Any suggestions on how to share the pcloud mount with other containers?
Can I pass fuse arguments as env vars to this container?

Hi, thank you for putting this repo together, it helped me run pcloud on my raspberry pi.

I would like to also run syncthing on my server (in docker), so that i can synchronise a pcloud folder to a folder on my phone.
It sounds crazy, but pcloud cannot do this (nor the other cloud storage providers, including any "offline" availability options).

That means that I need to mount a pcloud subfolder in my syncthing container, and then share it with my phone.
For example:

syncthing:
  container_name: syncthing
  image: syncthing/syncthing:latest
  volumes:
    - syncthing-config:/config
    - ~/syncthing-sync:/var/syncthing
    # THIS BADBOY 👇
    - ~/pcloud:/opt/pcloud

However, starting this container fails with the error:
Error response from daemon: error while creating mount source path '/home/user/pcloud': mkdir /home/user/pcloud: file exists

It turns out that because the pcloud directory is a fuse mount, trying to mount it inside another container is a little tricky.
I think the fuse volume needs to be mounted with the allow_root option:
- https://stackoverflow.com/a/61686833
- https://serverfault.com/questions/943979/using-a-fuse-mounted-directory-as-a-docker-volume

It seems this is really a pcloudcom/console-client issue.
I saw your comment here: pcloudcom/console-client#184
Any suggestions on how to share the pcloud mount with other containers?
Thank you 🙏

@jlloyola
Copy link
Owner

I haven't tried mounting the pcloud volume in more than one container.
I created this image to be able to access pcloud from a raspberry pi (like in your case).
Running the container as root will cause file permission issues between the host and the container.
Some ideas to try out:

  • Try creating the mount directory (in the host) as noted here. Confirm the directory exists and has the appropriate permissions with ls -ld <path>
  • Start this container first before the syncthing container.
  • Run the syncthing container with the same uid, gid as the pcloud container.

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

No branches or pull requests

2 participants