PWD not found defaulting to blank string on Windows - Containers not starting
wilmshurstm opened this issue · comments
From Chapter 12 onwards, the 'config-server' gets a warning that '$PWD var' can't be found (on a windows machine) during the 'docker-compose up' phase. The net result is that all dependant Containers will fail on starting unable to get credentials.
The fix to this (for Windows) is to replace in config-server/../application.yml:
- spring.cloud.config.server.native.searchLocations: file:${PWD}/config-repo
with:
- spring.cloud.config.server.native.searchLocations: file:./config-repo
The same is true for this line in the the docker-compose.yml files (from '${PWD} to '.')
Hope this helps
Hello Mark and thanks for the hint!
I actually would recommend you to look at using WSL 2 on a Windows PC, where all commands from the book can be used without changes (running bash
in a Linux server under WSL 2). The minikube instance needs to be created slightly differently, but other than that, the same commands can be used.
I have recently published a second edition of my book, and it covers setup of WSL 2 on a Windows PC. I have also written a blog post on the updates in the 2nd edition , if you are interested.
Hello again Mark!
Since I haven't heard from you based on my response I will close this issue now.
Please let me know if you have further thoughts!