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

use without docker desktop (docker engine ) #1

Open
cirolosapio-accenture opened this issue Jul 11, 2023 · 6 comments
Open

use without docker desktop (docker engine ) #1

cirolosapio-accenture opened this issue Jul 11, 2023 · 6 comments

Comments

@cirolosapio-accenture
Copy link

hi
i've used this confiugration a lot with docker desktop but when i switched from docker desktop to docker engine i cannot connect to host from container anymore

do you find any solution?

@j-tim
Copy link
Owner

j-tim commented Jul 12, 2023

Hi @cirolosapio-accenture,
With Docker desktop, this should work out of the box without adding the --add-host=host.docker.internal:host-gateway flag.

I assume you switched from Docker Desktop on eighter Mac of Windows to Docker engine on a Linux system, right?
In that case, your need to add the flag.

@cirolosapio-accenture
Copy link
Author

yes i've installed docker engine + compose on wsl but unfortunately this flag is not enough
i'm not able to see the host from the container

@j-tim
Copy link
Owner

j-tim commented Jul 15, 2023

Ok so you are using the Windows Subsystem for Linux (WSL) and the Docker engine without using Docker desktop on Windows. To be honest I don't have experience with these kind of setups. Don't you have the option to use run the Docker engine using Linux and skip the whole Windows part?

If you can't, do you need to enable some firewall settings in Windows?
This blogpost might be interesting to read: https://medium.com/@frcs6b/wsl2-docker-without-desktop-communicate-with-windows-host-92daf9cf73cd

@cirolosapio-accenture
Copy link
Author

Don't you have the option to use run the Docker engine using Linux and skip the whole Windows part?

what do you mean with "Windows part"?
i've installed the docker engine on wsl following the guide for linux and it works

the last problem remain to be able to see windows/wsl host from the container

If you can't, do you need to enable some firewall settings in Windows? This blogpost might be interesting to read: https://medium.com/@frcs6b/wsl2-docker-without-desktop-communicate-with-windows-host-92daf9cf73cd

i've read and after some tests i'm not able to see windows/wsl

@j-tim
Copy link
Owner

j-tim commented Jul 21, 2023

Thanks for your response.
To be honest i still don’t exactly understand what you try to do.

Do have a small example repository to reproduce the issue? Otherwise maybe create an issue on the Docker project.

I dont’t have experience with Windows subsystem for Linux.

@cirolosapio-accenture
Copy link
Author

cirolosapio-accenture commented Jul 21, 2023

yes this one

i have a php container and i'm trying to debug it with xdebug from vscode
this require that the php container can comunicate with windows/wsl host (where i run the debug server)

until a few months ago i was able to debug with docker desktop
now i switched from docker-desktop to docker-engine only and the same configuration does not work anymore

desktop vs engine

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