Yii2 docker image - cant connect xdebug

Hello,

running on Windows 10, using docker desktop, i have the following docker compose file:

version: '2'
services:
  php:
    image: yiisoftware/yii2-php:8.1-apache
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
    environment:
      PHP_ENABLE_XDEBUG: 1
    ports:
      - '8000:80'

Then, in VS code using the xdebug extension, i have the following launch.json configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug on Docker",
            "type": "php",
            "request": "launch",
            "port": 9000
        }
    ]
}

I then try to put some breakpoints on the code and access the application at http://localhost:8000/

At this point, i get the following messages in the docker container console:

2024-04-14 17:15:41 [Sun Apr 14 16:15:41.172482 2024] [php:notice] [pid 33] [client 172.22.0.1:41682] Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9005 (through xdebug.client_host/xdebug.client_port)

What i am doing wrong that i cant debug the code? Can someone help me please? Already read several topics and posts and cant find a solution for this…

Thanks for all the attention.