-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
PHPStorm on Windows, DDEV in Docker in WSL2, Docker-Compose path wrong #152
Comments
@ChristianAdamski and I spent quite a bit of time on this and I explained that this is a PhpStorm regression (Unable to configure docker-compose properly in docker settings). I guess I wasn't clear. @ChristianAdamski please simplify the recreation of this PhpStorm problem (that you can't configure docker-compose properly) and then search issues in https://youtrack.jetbrains.com/issues/WI and then if there's nothing there, file a bug about this regression. |
No, I'm actually sure this is an issue of this plugin. I did start from scratch and also tested PHPStorm within WSL, as well as EAP versions of PHPStorm. I do notice, that the config path is set here: I have not yet figured out, where the docker-compose path is set. |
Are you able to configure the docker integration successfully if the plugin is removed? |
No, not at all. Which brings me to the question, why PHPStorm is able to locate the file at all, if I never point to it anywhere. Hence my assumption, that the DDEV plugin is taking care of it, |
The "DDEV" CLI interpreter is automagically configured by the DDEV plugin. As is the server settings. |
@ChristianAdamski you're still using docker-ce inside wsl2 right, which has never been claimed to be supported by the plugin. Have you tried with Docker Desktop? |
Well, this is effectively a feature request. I just didn't see that as an option. I'm not saying this plugin is broken on something it advertises to do, I'm saying it might be fairly easy to fix this here. I do not know though. |
If I understand your goal, it's to run the php interpreter inside the DDEV web container. The failure here has nothing to do with this plugin. Here are my results of trying to configure the PHP interpreter in the traditional way when using WSL2 as the docker provider. This is with the plugin disabled. I'm pretty sure you need to file an issue with PhpStorm. (BTW, I tested on macOS with alternate docker provider colima, and it worked there.) And yes, PhpStorm is very confused about what docker-compose it can or should use. |
I confirm that (without plugin) Docker Desktop works fine to use the in-container php cli, as normally documented in the DDEV docs. It does not work with docker-ce. None of this has to do with this extension, although if PhpStorm work working correctly we might find out. To proceed, it's going to be necessary to demonstrate this problem in the PhpStorm queue, it won't be solved here or in the DDEV queue. To get them to look at it, you'll need to use a trivial |
Thank you for reporting your issue! The docker compose binary that is used can be configured in As already mentioned above, supportet system configurations are Ubuntu with docker-ce, Mac with docker or colima and Windows with Docker Desktop, both inside WSL or on the native file system. Sadly @rfay just showed us that PHPStorm doesn't seem to support your setup (docker-ce in WSL) yet. As soon as there is support by the IDE we can see if there is anything we can optimize in the plugin. If there is anything I can help you with, please let me know. Thanks @rfay for your fast reaction on this and the testing! |
Side-note FYI @nico-loeber "compose V2" setting in Docker Desktop is misinformed/mislabeled. What they mean is "Use |
Yes I am aware of that @rfay, but using the v2 syntax will make sure the installed docker compose is v2 ready. Depending on your OS the versions delivered by your package manager may not be v2. |
What I'm saying is that the checkbox here does not say anything about v2 syntax.
|
Actually, the more I think about it: If you check the We should probably get them to rename that checkbox... |
Interesting thoughts @rfay but a bit offtopic. ;) |
Nothing here yet but loos like is only Jetbrains issue! |
As @shochdoerfer mentioned, the fix of the issue #187 might have impact on this as well, since there were missing environment varialbes that could cause different "binary x not found" errors under certain circumstances. |
I need to open an issue with Jetbrains about the misunderstanding of "v2" :) |
Youtrack issue about misunderstanding "Compose V2": https://youtrack.jetbrains.com/issue/WI-73632/Misundertanding-Miscommunication-of-docker-compose-v2 |
One year letter and after many JetBrains and WSL tickets... TADA |
Congrats to @nico-loeber ! I still don't know how docker-compose can properly be used with PhpStorm on Windows and WSL2. It always wants to use a docker-compose.exe on the WIndows side, which sometimes even works, but it's just wrong. I don't think PhpStorm knows how to use a docker-compose binary inside WSL2. |
@alexbogias are you saying this is working now? Using same versions of everything but still having the issue here. Do you mean the docker.exe from the link needs to be on the system path? |
@btantlinger Yeah add the path you extracted it to windows system env variables and also to Settings -> Build -> Docker -> Tools -> Docker binary |
ddev version v1.23.4 Chocolatey / The Windows side of ddev seems to not install docker anymore? |
Independent of DDEV, I do not understand how this is supposed to work in PHPStorm. People using WSL2 and docker within is probably the standard case by now. Where would any windows binaries come into play? |
@ChristianAdamski Please open a new issue, probably in the ddev/ddev repository. First, get DDEV working, then work on PhpStorm. If you follow the instructions for installing on WSL2, you will see it try to install the Windows |
@rfay With all due respect to your amazing work, please don't ignore what I posted. None of this relates to hosts or routing. The issue is in the description of the DDEV PhpStorm Setup:
My problem is the second sentence. |
ddev itself within WSL2 works perfectly fine and I can reach the website on the Windows site as well |
@ChristianAdamski Try update PHPStorm to 2024.2. No matter the red focus ring in docker compose executable... The only things that dont work for me is docker binaries inside WSL and node inside ddev PS. This was broken again in PHPStorm 2024.0 and 2024.1 |
Interesting. I am on PhpStorm 2024.2.1 Differences I note from your screenshot:
I'm currently trying out to set up Docker and Interpreter manually. |
It would help if you'd do a |
I was successful by deleting existing settings and adding things manually in PhpStorm. DDEV itself was already working fine. 1.) Installed Docker Desktop on the Windows side and set paths in PHPStorm to those Windows executable The rest then just worked. |
So, in conclusion: I do think the ddev - phpstorm plugin set things up slightly incorrectly. Also, Docker Desktop seems to be necessary until PhpStorm learns to use docker compose in WSL. There are tickets for this at intellij, but seems to be no priority for them. So maybe close this? But add a link in the official readme as a workaround for other people running into this? |
Either way: thanks for everybodys help & patience. This is tough to debug for me. |
@ChristianAdamski I got the binary there |
I was wondering if you had Docker Desktop installed, but were trying to use docker-ce. |
@rfay I never used docker on Windows knowingly. I'm 99% sure, Docker Desktop was installed by ddev/chocolatey before? It wasn't now, so I installed it manually to please PhpStorm. Docker-CE I only know from linux. |
Just for the record: DDEV is such an amazon tool and this integration plugin as well. I know that at least half the problems are caused by PhpStorm itself. So long story short: I appreaciate all the work. |
Is there an existing issue for this?
Are you sure that this bug is related to this DDEV Integration Plugin?
Enter your error report ID (If available)
No response
Describe the bug
See above image. While the path to the yml is correct, something in the composer call is wrong. Paths set in Settings->Build -> Docker -> Tools have no effect and wouldnt work anyway, as these require Windows executables.
Steps to reproduce
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: