FluentDocker icon indicating copy to clipboard operation
FluentDocker copied to clipboard

Mount("/path/host", "/path/container", ountType.ReadWrite) not working like -v /path/host:/path/container

Open madf0x opened this issue 3 years ago • 1 comments

Hey,

I've been trying to use FluentDocker to set up a container, that should save files to a specific path.

When I use the docker CLI directly with -v /pathHost:/pathCont the container works as expected and all files written in the pathCont while executing the container are visible on the host machine.

Doing the same with FluentDocker results in a container, that looks exactly the same when doing docker inspect on both containers, except that one label is missing:

            "desktop.docker.io/wsl-distro": "Debian",

I've tried adding that using .WithLabel("desktop.docker.io/wsl-distro", "Debian") or .WithLabel(new [] {"desktop.docker.io/wsl-distro", "Debian"}) ... but this resulted in 2 labels without values assigned.

Can this missing label cause the problem, that one volume bind is working and the other one isn't? I'm out of ideas for now.

madf0x avatar Aug 16 '22 17:08 madf0x

I've managed to add the label using

        .WithLabel("\"desktop.docker.io/wsl-distro\"=\"Debian\"")

But still no luck. Manually started using DockerCLI works, using FluentDocker doesn't. same

Here is the Notepad++ Compare output of the two containers.

madf0x avatar Aug 16 '22 18:08 madf0x