Bind Mount Failure Error when building?

Hi, I hope someone can help. When I try to build this;

version: '3.7'
services:
  tubesync:
    image: ghcr.io/meeb/tubesync:latest
    container_name: tubesync
    restart: unless-stopped
    ports:
      - 4848:4848
    volumes:
      -  /volume1/docker/tubesync/config:/config/
      -  /volume1/docker/tubesync/downloads:/downloads
    environment:
      - TZ=America/New_York
      - PUID=1028
      - PGID=100

  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    environment:
      - PUID=1028
      - PGID=100
      - TZ=America/New_York
    volumes:
      - /volume1/docker/syncthing:/config 
      - /volume1/docker/syncthing/data1:/data1
      - /volume1/docker/syncthing/data2:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

  
  ytdl_material:
        container_name: ytdl
        environment: 
            ytdl_mongodb_connection_string: 'mongodb://ytdl-mongo-db:27017'
            ytdl_use_local_db: 'false'
            write_ytdl_config: 'true'
        restart: unless-stopped
        depends_on:
            - ytdl-mongo-db
        volumes:
            - ./appdata:/app/appdata
            - ./audio:/app/audio
            - ./video:/app/video
            - ./subscriptions:/app/subscriptions
            - ./users:/app/users
        ports:
            - "8998:17442"
        image: tzahi12345/youtubedl-material:latest
  ytdl-mongo-db:
        # If you are using a Raspberry Pi, use mongo:4.4.18
        image: mongo:4
        logging:
            driver: "none"          
        container_name: mongo-db
        restart: unless-stopped
        volumes:
             - ./db/:/data/db

I receive an error; bind mount failure ?

Not sure what you mean with ā€œbuildā€. You ā€œbuildā€ a Docker image from a Dockerfile, but this is a docker-compose.yml file, so itā€™s rather ā€œstartā€ or ā€œrunā€.

A bind mount is something you have under volumes: which starts with a path like ./ or /. One of those directories might not exist or have the wrong user rights to be accessed.

I created all the correct directories and it still doesnā€™t work ?

Maybe the second part of the sentence?

I have complete ownership over all the directories; therefore every directory has a full rights. Just to clarify ./appdata is a directory that should be created within the container in this case; youtube-dl/material is the main directory ?

This is not something Docker would say without showing some more details. ā€œbind mount failureā€ is barely more information than ā€œsomething went wrongā€ and without knowing what went wrong, it is impossible to solve.

Please, show the commands you ran and the exact error message with the context. Without context, all we can do is guessing.

Iā€™m not running any commands, Iā€™m using a container manager to control all the containers and I have one YAML file with all the configurations in one file; why I posted the one YAML file.

When looking at the containers that are running, two work out of four; the other two donā€™t work because of this error.

The point is that you have to share more information. If you donā€™t share what you do, we canā€™t help. You use a container manager, but you havenā€™t shared which one. If that container manager doesnā€™t show proper error messages, you need someone who used that container manager. We can help with docker commands. Manager softwares can help if you use them in addition to Docker commands, but otherwise those will just make your life harder.

Synology Inc.
This is the container manager.

Thank you. So you are running Docker on Synology. I did a quick research now and it looks like Container Manager is the new name for an improved UI replacing the package called ā€œDockerā€. I have no personal experience, but as far as I know, the Docker on Synology is a modified Docker. Maybe @meyay can confirm if I remember it correctly.

Iā€™m not familiar with the not too informative ā€œbind mount failureā€ error message and I donā€™t even know how you could get more detailed error messages. I would have ideas on a Linux server, but not on Synology. I found some sources though, but they mentioned ā€œbind mount failedā€ and not ā€œbind mount failureā€

The second one mentiones ā€œbind mount failureā€ but not as an exact error message. The message contains ā€œbind mount failedā€, the same way as in the third report.

So it looks like you either have an error message which I canā€™t find enywhere on the internet (I admit I havenā€™t searched everywhere on the internet), or you didnā€™t share the exact error message as I asked for.

Either way, I think your issue canā€™t be answered by just knowing the official Docker and you could have better answers from Synology users.

1 Like

Indeed, it is! This docker distribution is maintained and supported by Synology. The support channel for this is Synology itself.

Nevertheless, from first hand experience I can say that bind volumes do work on Synologyā€™s docker, regardless whether it comes packaged with Syno`s Docker or Container Manager package.

Some details you didnā€™t share so far:

  • Which of the services are working? If tubesync and syncthing are the working ones, than your problem could be the relative paths you use on the other two services.
  • How do you deploy the compose project?
    • Container Manager UI?
    • docker-compose ?
    • docker compose? (that is if you installed the cli plugin yourself)

Furthermore, the bind against the container folder /config looks weird:

I assume you meant to use - /volume1/docker/syncthing/config:/config?

Note: I highly recommend being consistent with how you configure your services. The first two service use list-syntax env variables and absolute paths for the binds. The third service uses map-syntax env variables. The third and fourth service use relative paths for the binds.

1 Like

tubesync & syncthing are both working including, mongo-db except youtubedl is not working ?

The project was composed using Container Manager GUI.

The first two service use list-syntax env variables and absolute paths for the binds. The third service uses map-syntax env variables. The third and fourth service use relative paths for the binds

I donā€™t follow where this information is to be found or how you know ?

I take you didnā€™t compare the environment and volumes elements of the services I mentioned, otherwise you would have noticed the differences.

Please share the directory content of the directory you set as ā€œpathā€ in your project. The binds you declared in the volumes elements of ytdl_material and ytdl-mongo-db use paths relative to the project path: make sure they exist.

Note: the file permissions you declare using the Synology UI use ACL, while container care for unix file permissions. Often setting the ACLs alone is not enough.

1 Like

How do I compare the environment & volume elements of the services ?

Please share the directory content of the directory you set as ā€œpathā€ in your project.
Do you mean the volumes ?

Are you asking how you compare elements from your own compose file?
Have you considered looking at them and checking for the differences.

Have you considered posting your question in the (official) Synology forums, or the (unofficial) syno-forum?

I hope you find the solution, good luck!

In case the problem is how we use English, I would rephrase it as ā€œcompare the envrionmnent sections in your service definitions and also compare the volumes sections in your service definitionsā€. Do not compare the environment sections with volumes

It is the English phrasing. Although I still am at a loss on how to do this comparison as to which I mentioned to @meyay ?

You got answers from @meyay and he also asked for a specific information. That is what you should have focused on not on a side note.

The point is that you make sure you donā€™t randomly configure things differently in each service instead of following the same syntax. Regarding comparison, I couldnā€™t have told you more than meyay did. You look at the file and compare one setting with another. One uses a list of environment variables and the other is a mapping of environment variables? Thatā€™s thei nconsistency then.

But again, the more important part is what meyay asked for and the part about ACL vs. unix file permissions.

I found what the problem is; in this container manager the top most container in the YAML file is in my case is tubesync which is the originally created name of the image container. Therefore if you mix multiple containers in one YAML file all the sub-directories for those containers must be created within the tubesync directory; instead of their own directory with the containers sub-directories residing.

I donā€™t necessarily like this, so I have to change.