Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker for Windows #7

Closed
Norm-Cota opened this issue Jun 13, 2020 · 1 comment
Closed

Docker for Windows #7

Norm-Cota opened this issue Jun 13, 2020 · 1 comment

Comments

@Norm-Cota
Copy link

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.

@diegomvh
Copy link
Owner

Hi @Norm-Cota
thank you very much,
soon I add this information to the README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants