invalid bind mount spec
When trying to invoke "HelloWorld" from Samples I get the following error. How do I fix it. Below is the output. I am running Docker Toolbox on Windows7.
C:\Users\gaurav_kamdar\go\src\github.com\awslabs\aws-sam-local\test\templates\sam-official-samples\hello_world>sam local invoke "HelloWorld" -e event.json 2017/08/24 14:20:25 Successfully parsed template.yaml ←[34mINFO←[0m[0000] Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows 2017/08/24 14:20:25 Connected to Docker 1.28 ←[34mINFO←[0m[0000] Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows 2017/08/24 14:20:25 Fetching lambci/lambda:nodejs4.3 image for nodejs4.3 runtime... nodejs4.3: Pulling from lambci/lambda
←[1B84c367d8: Already exists ←[1Bf5aea2af: Already exists ←[1BDigest: sha256:fe7fd26840b4f06ba6626148f8bd234a6da21cd4fa2354dbc7c78be2d9bd5e3111kB/2.011kBB Status: Downloaded newer image for lambci/lambda:nodejs4.3 2017/08/24 14:20:26 Invoking index.handler (nodejs4.3) 2017/08/24 14:20:26 Could not invoke function: Error response from daemon: invalid bind mount spec "C:/Users/gaurav_kamdar/go/src/github.com/awslabs/aws-sam-local /test/templates/sam-official-samples/hello_world:/var/task:ro": invalid volume specification: 'C:/Users/gaurav_kamdar/go/src/github.com/awslabs/aws-sam-local/test /templates/sam-official-samples/hello_world:/var/task:ro'
Are you using cygwin or git bash? Does this reproduce in cmd.exe or powershell?
Also, can you make sure C:/Users is in list of shared directories under Docker Toolbox?
I'm facing the same problem on Windows 10 Home 2017/08/26 21:59:36 Could not invoke function: Error response from daemon: invalid bind mount spec "C:\Users\John\AppData\Local\Temp\aws-sam-local-1503781175721651700:/var/task:ro": invalid volume specification: 'C:\Users\John\AppData\Local\Temp\aws-sam-local-1503781175721651700:/var/task:ro' aws-sam-local-1503781175721651700 exists on the local file system, but I assume SAM local is writing to that
I'm using docker for the first time, so apologies if some of the responses are nonsense
I'm using git bash which was installed with the docker toolkit - I've tried cmd and powershell, but with both those I get
2017/08/27 10:06:53 Running AWS SAM projects locally requires Docker. Have you got it installed?
Is there a way of getting a list of shared directories from Docker Toolbox, all I could find in the docs was for listing shared directories in a container and the container is not running. VirtualBox for default has a folder of name c:/Users and path \?\c:\Users with auto-mount and full access.
I am having the same problem on Docker toolbox and windows 7.
I figured out that if you set --docker-volume-basedir \c\Users when invoking, it works.
Yeah, that's the solution. It is also documented in README file
kudos