Docker for Windows
Norm-Cota opened this issue · 1 comments
I ran into issues trying to run the docker image from within Docker for Windows against an OData that is running on localhost. I also figured out the workaround and thought I should post it for documentation purposes.
The default installation of Docker for Windows does not enable containers to connect to the host via localhost. ie. "http://localhost" doesn't work. A workaround is documented at docker here: https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds
Additionally, the "$" in the standard metadata url seems to cause issues. I'm not sure why, but the workaround is to URL encode the "$" to "%24".
So, the example command when running in Docker for Windows when the target is running on the host machine is:
docker run -it --rm -v ${PWD}:/local diegomvh/odataapigen \
Name=MsGraph \
Metadata=http://host.docker.internal/%24metadata \
Output=/local
Hope this helps.
Hi @Norm-Cota
thank you very much,
soon I add this information to the README