So it is not snap at least, but it is not the latest Docker Engine from the official APT repository of Docker.
It should be able to bind mount from a mounted disk, but I still recommend to remove that version and install Docker from the official documentation I linked above. Since you are using Ubuntu, this is a more direct link:
As you can see it starts with the instruction to remove docker.io
Hi @rimelek, I uninstalled and installed the latest version using the steps mentioned in the link you shared, I still get the same error.
Can you suggest any other pointers
I have one question, might be a noob one. As I said, error happens in the newly mounted disk. Is it possible that docker is trying to bind the path of newly mounted disk from ~ , that is the reason it says source path doesn’t exist?
Do you mean from the user’s home? The Docker daemon is running as root and Docker would not use a reference like “~”. Maybe only to access the user’s docker client config. How would that work? I can’t even imagine.
On the other hand, you gave me an idea. Is this the correct path?
/mnt1/vendor_build/06_11
I mean /mnt1 seems strange. Isn’t that just /mnt ?
Then it’s time to debug step by step. Try to mount the root of the host like:
docker run -v /:/host ...
Then list the fles in /host/mnt1.
If that works, then you can try to mount /mnt1/vendor_build and list the files in the mounted path in the container again. If you get invalid source path again in any step, you will know which folder contains an invalid character even if that is a non-printable character.
The source path has to be on the left side of the colon and the destination (path in the container) has to be on the right side. All your commands just mount the root of the host to different folders in the container. This could work:
docker run --rm -v /:/host ubuntu ls -l /host
docker run --rm -v /mnt1:/host ubuntu ls -l /host
docker run --rm -v /mnt1/vendor_build:/host ubuntu ls -l /host
Note that I used --rm which removes the container after running it. Without this you will have many stopped containers on your host. You can see that with docker ps -a
Now it’s clear that you don’t have /mnt1 on the host exacrly as I suspected. Then you wrote the following:
Where did you exactly run that stat command? Based on your previous docker commands before I corrected the source and destination, you used /mnt1 on the right side. Now I am starting to think that it is actually inside the container. What I don’t understand now, what you try to mount.