简体   繁体   中英

How do I set up PhpStorm/WebStorm to work with Node.js in a docker container?

I am trying to use PhpStorm to debug as Node application that is running in a docker container. The image is called parsoid-dev, it only exists locally on my machine. I can run it using docker run parsoid-dev .

In the PhpStorm settings, I created a remote Node.js interpreter configuration for this image using the server type "Docker", image "parsoid-dev", and path "node".

node.js 解释器设置对话框

But when I try to run the application, I get this error:

Failed to prepare environment: Cannot find image: parsoid-dev

But the image is clearly there, I can use it from the command line... What am I missing?

EDIT: I'm using PhpStorm 2021.3.3 on Windows 11 and Docker for Windows 4.6.0 (Docker Desktop engine 20.10.13). I'm running Ubuntu 20.04.4 in WSL2.

Please try specifying the image name with a tag, eg parsoid-dev:latest - does it help?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM