thanks for your answer. But this is most likely not the cause. I tried several formattings as well as ' and " from various pages (and most of them actually repeat over the years tho) but that doesn't work.
So I just got my productive 10 minutes and found some things which leads me to a theory..:
If we check the rclone Dockerfile we notice it uses an ENTRYPOINT and no CMD, while the entrypoint also is just rclone. That also fits the example in the install instructions where everything after the image rclone/rclone acts as as COMMAND. Thus the executing result will be ENTRYPOINT rclone + COMMAND mount dropbox:Photos /data/mount & will be rclone mount dropbox:Photos /data/mount &.
Theory: In that case I think the best solution on my side is to overwrite the ENTRYPOINT in the docker-compose executing all my commands.
A better solution might be using CMD ["/bin/sh"] as in official Alpine Dockerfile. That way my command via sh-c would probably have worked and now maybe gets confused by the ENTRYPOINT?
Not too sure on that yet... But next I will check if I have success overwriting the ENTRYPOINT. Altough I can't be the only one with that problem?
Creating network "rclone_default" with the default driver
Building rclone
Step 1/3 : FROM rclone/rlone:beta
ERROR: Service 'rclone' failed to build: pull access denied for rclone/rlone, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Yeah I do have to use an empty entrypoint in the docker-compose to get rid of the entrypoint locking to "rclone".
However I don't get the command to work to mount everything and do the cache warmup.
Anyway I honestly can't spend more time on such a simple issue and I even assume that 80% of the users aren't advanced enough to make it work.
If that is the official rclone Image I really would like to ask the creator to make it actually usable and working...
I know how to set the entrypoint... You just wouldn't want to use such a long command (i.e. multiple commands) in the entrypoint syntax. Overwriting entrypoint with "empty" works just fine tho. Just the command doesn't.
I don't really understand why not! I'm not a Docker expert just an occasional user.
Well if you can figure out how to improve it I'd be grateful! Open source projects rely on knowledgeable people dropping in to fix difficult stuff. The Docker file is here: rclone/Dockerfile at master · rclone/rclone · GitHub
Well in theory it works that way, either way, using entrypoint: "" and command as well as maintaining my own dockerfile and loading all the commands as the entrypoint Script.
But I simply don't get further as:
2020/04/29 05:55:16 NOTICE: Serving remote control on http://127.0.0.1:5576/
2020/04/29 05:55:16 ERROR : rc: "vfs/refresh": error: couldn't find method "vfs/refresh"
Will need to think about a theory that could work out to improve the Container but I'm not good at it.
You'll get that if the mount hasn't started at all or hasn't started yet. The vfs rc commands aren't plumbed in until the mount has started I don't think.
This is caused by the ENTRYPOINT being defined in the Dockerfile, and this will run by default even if a command is given. You're getting the error because it's being interpreted as <entrypoint> <command>, or rclone rclone mount..., as you noted in your message earlier in the week.
Also, your > notation is breaking the argument list. You can remove it - quotes work across multiple lines in yaml.
The ideal fix to this would be to change ENTRYPOINT to CMD in the Dockerfile.
I considered opening a PR to fix this and the example compose files, but unfortunately it means that anybody who built their own compose files based on those examples would also need to update theirs to work with the latest container. As it currently is however, the example compose files do work, which is why you're likely the only one having this issue.
Alternatively, the compose file in the OP could be modified to work without changing the entrypoint like so (I think - I don't have a setup to test this handy, so if you could give it a go and let me know that would be great).
Correct - Anybody using the current image would break, which is why I didn't PR it
To be honest I think the entrypoint is fine how it currently is. It's not hard to override, and only causes problems if you're trying to do something overly complex (like mount 9 drives in a single container). If rclone is being used as a standalone program as intended, it works fine.
If users are trying to do complex tasks with docker+rclone, they should be experienced enough to write their own dockerfiles and understand the ramifications of a bunch of FUSE mounts in a container. There are better ways to handle the OPs use-case without even having to overwrite the entrypoint, and provide a more stable environment, eg: