首页 > 解决方案 > 使用 docker-compose 的 Pycharm 远程解释器无法在调试模式下工作

问题描述

我有一个使用 docker-compose 的 Pycharm 远程解释器设置,我能够正常运行该项目,但是在尝试调试时出现此错误:

ERROR: for e21cea317159_my_proj  Cannot create container for service myproj: conflicting options: port publishing and the container type network mode

我的码头工人撰写文件:

version: '1.0'
services:
  my-router:
    image: testimage:latest
    dns: 10.10.10.10
    dns_search:
      - testwebsite.com
  et:
    build:
      context: ""
      dockerfile: Dockerfile
    volumes:
      - .:/workarea
    depends_on:
      - "my-router"
    environment:
      - WAIT_FOR_PORTS=my-router:12345
    network_mode: service:my-router

谢谢您的帮助!

标签: dockerdocker-composepycharmremote-debugging

解决方案


推荐阅读