Docker and nested app

I have a webstorm (running on Windows 10) project with a couple of apps. Each app lives in their own directory under the main one. Each directory has their own Dockerfile. Something like

app
  bot
Dockerfile
bot.js
skills.yaml
.env
  db
Dockerfile

From the terminal, I can docker build . -t name/app in the bot directory and things start up. I can run the Dockerfile from Webstorm and that also works. But when I try to debug the app, the Building Project Image step fails with the message: Can't retrieve image ID from build stream.

The Dockerfile is

FROM node:12
WORKDIR bot
COPY package.json package.json
RUN npm install
COPY .env .
COPY bot.js .
COPY skills.yaml .
RUN node bot.js

The Run/Debug configuration is a Node.js entry.

Node interpreter: docker://node:12/node
Working directory: ~\projects\app\bot
JavaScript file: bot.js
Docker container settings: -v C:\Users\me\projects\app:/opt/project

If I use a non-docker configuration, the app loads and I am able to set breakpoints.

Any idea what I should be looking at to get this to work?

Thanks

 

 

Please sign in to leave a comment.