Coder Social home page Coder Social logo

Comments (5)

blastbeng avatar blastbeng commented on August 25, 2024 2

@fede8802 You're my savior!

I can confirm that this is the correct configuration using docker-compose:

version: '3.3'
services:
  rclone-mount:
    container_name: rclone-mount-${NAME}
    restart: unless-stopped
    cap_add:
      - SYS_ADMIN
      - SETPCAP
      - MKNOD
    security_opt:
      - apparmor:unconfined
    devices:
      - /dev/fuse
    environment:
      - 'RemotePath=$NAME:/'
      - 'MountPoint=/mnt/$NAME'
      - 'ConfigDir=/config'
      - 'ConfigName=$NAME.conf'
      - 'MountCommands=--allow-non-empty --allow-other'
    volumes:
      - '/my/custom/confdir/$NAME.conf:/config/$NAME.conf'
      - type: bind
        source: '/my/custom/mountpoint/$NAME'
        target: '/mnt/$NAME'
        bind:
          propagation: shared
    image: mumiehub/rclone-mount
    restart: unless-stopped

Now when using df i see the mount!

mycustomname:/ 20G 9,7G 11G 49% /mnt/mycustomname

from docker-services.

ClemTheStudent avatar ClemTheStudent commented on August 25, 2024

Added these caps resolved the problem for me:
cap_add:
- SYS_ADMIN
- SETPCAP
- MKNOD
source: https://docs.docker.com/engine/reference/run/

from docker-services.

blastbeng avatar blastbeng commented on August 25, 2024

Hi, I think the issue it's still there, I'm using docker compose with an encrypted rclone mount:

version: '3.3'
services:
  rclone-mount:
    container_name: rclone-mount-${NAME}
    restart: unless-stopped
    cap_add:
      - SYS_ADMIN
      - SETPCAP
      - MKNOD
    security_opt:
      - apparmor:unconfined
    devices:
      - /dev/fuse
    environment:
      - 'RemotePath=$NAME:/'
      - 'MountPoint=/mnt/$NAME'
      - 'ConfigDir=/config'
      - 'ConfigName=$NAME.conf'
      - 'MountCommands=--allow-non-empty --allow-other'
    volumes:
      - '/my/custom/confdir/$NAME.conf:/config/$NAME.conf'
      - '/my/custom/mountpoint/$NAME:/mnt/$NAME:/'
    image: mumiehub/rclone-mount
    restart: unless-stopped

And in env file: NAME=mycustomname

If i access the container i can see the files under /mnt/$NAME but when i go to the host mount point i see nothing. Looks like docker can't correctly mount the mnt directory.... Any help?

from docker-services.

fede8802 avatar fede8802 commented on August 25, 2024

I had the same problem and solve it by seting the propagation as shared.

Try to do the following with the volumes declaration:

  - type: bind
    source: '/my/custom/mountpoint/$NAME'
    target: '/mnt/$NAME:/'
    bind:
      propagation: shared

from docker-services.

Mumie-hub avatar Mumie-hub commented on August 25, 2024

Here is an example rclone-mount/docker-compose.yml for ubuntu 18/20. Notice the version 2 of docker-compose! There are some MountCommands (https://rclone.org/commands/rclone_mount/) that manipulate the update interval e.g. --poll-interval --dir-cache-time.

from docker-services.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.