joepurdy/DockPress

Cannot create container for service app: the working directory 'C:/Program Files/Git/var/www/html' is invalid, it needs to be an absolute path

Opened this issue · 7 comments

I'm submitting a...

  • [X ] bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Get error on $ ./develop init ao

mkdir: cannot create directory ‘src’: File exists
Cannot create container for service app: the working directory 'C:/Program Files/Git/var/www/html' is invalid, it needs to be an absolute path
Cannot create container for service app: the working directory 'C:/Program Files/Git/var/www/html/web/app/themes' is invalid, it needs to be an absolute path

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://asciinema.org/

What is the expected behavior?

What is the motivation/use case for changing the behavior?

Please tell me about your environment:

Windows 10
Git Bash

OS: [Windows | OSX | Linux]

Other information

Sounds like you're trying to run ./develop init from a directory that already contains a src directory.

If you want to trash everything and start fresh you should remove the src directory first. I believe that's rd /s /q "src" on Windows, although if you're using Git Bash as your shell rm -rf src should work.

I'm going to close this, but feel free to comment if there's a bigger issue beyond trashing the existing src directory.

Thank joe

Actually I’m sure that the ‘src’ folder error only came up when I ran ./develop the second time perhaps?

Everything ran fine till the ./develop bash which I tried on git bash for Windows which I then thought might be the issue as I had problems an before with git bash and certain admin permissions - so that’s the path I followed - tried the same on PowerShell but couldn’t figure how to run a bash command there?

Yeah I’ll scratch it and start again - thanks Joe - really love this bedrock docker procesure - well done

Let me know if you run into trouble on WIndows! I develop on OSX and arch linux so Windows bugs are a blindspot of mine. 😬

Sorry just to expand - the route I was investigating was “C:/Program Files/Git/var/www/html' is invalid” - which made me think the script was trying to access my local machine rather than the containers “/var/www/html’ folder?

Yeah no problem

Hi Joe - i've come across the solution to this indirectly on another project - it's specifically related to Windows and using Git Bash as the terminal ...

moby/moby#24029 ..

"Prefixing the path with a double slash (//bin/bash) should prevent this"

Aha! That's good to know, thanks for the heads up about that issue. Glad there was a clear cause and correction.