Cannot select services while configuring docker compose as remote interpreter

When I try to use docker-compose as remote interpreter in PHPStorm or PyCharm I cannot select a service to run. After selecting the compose file I get top level elements 'services' and 'network' in the services list instead of the services.

It used to work until recently. Might be related to an update of PHPStorm or Docker Desktop.

I'm using: MacOS Big Sur 11.5.1, PHPStorm 2021.2, Docker Desktop 3.5.2

My docker-compose.yml:

version: "3.7"
services:
sam-dashboard-service:
build:
context: ./docker
container_name: ${SAM_CONTAINER:-sam-dashboard}
ports:
- "${SAM_PORT:-127.0.0.1:80}:80"
volumes:
- ./sam-dashboard:/var/www/sam-dashboard
- ./purchase:/var/www/purchase
- ./studio:/var/www/studio
- ./docker/ssh:/root/.ssh
networks:
default:
name: local

PHPStorm screenshot

0

In fact, this is a known issue that should be fixed in the nearest builds:
https://youtrack.jetbrains.com/issue/WI-61205

As a workaround please disable the "Use Docker Compose V2" experimental Docker feature.

1

Disabling the V2 experimental docker feature worked for me.

 

Thanks!

0

Enabling "Use Docker Compose V2" feature helped for me :) My problem was that the list of services was empty.

0

请先登录再写评论。