I have installed a docker on WSL2 Ubuntu without docker desktop and if I use docker commands on Ubuntu everything works perfectly fine, but if I try to use docker for example in IntelliJ or Visual Studio Code console, I have error: The term ‘docker’ is not recognized as the name of a cmdlet, function, script file, or operable program.
How can I manage that… I saw some solutions, but there always was Docker Desktop installed.
Thanks in advance
Why would you expect the docker command work from a Windows command line when you installed it in a WSL distribution? Fortunately, VSCode supports WSL so you just need to chose WSL in the remote connection tab instead of SSH. Then VSCode would run in the WSL distribution and its terminal would open there too.
IntelliJ is different. They have a VSCode clone called “Fleet” but not as good. I never tried Fleet on Windows so I have no idea if that supports WSL. If not, you can still use any IntelliJ IDE with their Gateway app if you install SSH daemon in the WSL distribution.
Of course you could install the Docker client on Windows as well and configure the client to connect to the remote Docker daemon in the WSL distribution the similarly to how Docker Desktop works, but I would just use VSCode.
I installed intellij in a WSL2 distribution. I lost my notes about the installation, as getting the preview-renderer for markdown and asciidoc to work was not straight forward. It gets rendered on the Windows Host.
I prefer it over vscode and intellij gateway, and vscode with wsl integration over intellij gateway.