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

fix: prevent overwriting host.docker.internal in wsl #1605

Conversation

frozenbonito
Copy link
Contributor

@frozenbonito frozenbonito commented Oct 28, 2022

Description

This PR prevents overwriting host.docker.internal host in WSL environment.
I added is-wsl for checking if the process is running inside WSL.

Motivation and Context

In WSL, it seems that the host is not reachable with the gateway ip adress of bridge network.
For this reason, --add-host host.docker.internal:${gatewayIp} does not work as expected.

Docker for Windows supports host.docker.internal natively, so just avoid adding host.docker.internal and it works.

How Has This Been Tested?

This has been tested by running accessHost.test.js in WSL.

@dnalborczyk dnalborczyk merged commit c7f6f6d into dherault:master Nov 1, 2022
@dnalborczyk
Copy link
Collaborator

@frozenbonito we have some docker related tests which we are currently skipping unfortunately. 😞 I tried to fix those up some time ago, but wasn't quite sure about the intend for some of those. do you think you could have a look if you have some time?

@frozenbonito frozenbonito deleted the fix-accessibility-from-container-to-host-in-wsl branch November 22, 2022 14:24
@frozenbonito
Copy link
Contributor Author

@dnalborczyk
Thank you for merging and sorry for the late reply.

we have some docker related tests which we are currently skipping unfortunately. 😞 I tried to fix those up some time ago, but wasn't quite sure about the intend for some of those. do you think you could have a look if you have some time?

I would like to fix it. Do you mean docker-in-docker test?

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

Successfully merging this pull request may close these issues.

2 participants