docker - PhpStorm是否在后台运行自己的Docker容器?

标签 docker intellij-idea containers phpstorm jetbrains-ide

我想更好地了解在JetBrains的IDE中使用Docker开发时的幕后情况,在本例中为PhpStorm。

我看到我的项目根目录已映射到/opt/project,但是当我docker-compose up并在PHP容器中查找时,/opt/project不存在。因此,我猜测PhpStorm管理着它自己的Docker环境,该环境在其中部署了我的容器。

确实有3个域要考虑吗?

  • 本地计算机上的代码
  • PhpStorm运行的Docker容器->我可以通过PhpStorm运行测试
  • Docker容器由docker-compose up运行->我可以看到网站

  • 有人可以验证我所说的正确并提供更多背景信息吗?如果我说的是正确的,那么还会引起另一个问题,例如为什么我在PhpStorm Docker容器与我自己的docker-compose up运行之间没有端口冲突。

    在PhpStorm中配置测试(PHPUnit),依赖项管理(composer,自动加载,composer dump-autoload)时,这些问题开始出现。

    最佳答案

    不幸的是,IDE的Docker集成内部没有记录。

    I see that my project root directory is mapped to /opt/project but when I docker-compose up and look inside the PHP container /opt/project doesn't exist.


    在哪里看到的?您如何看内部?

    Is it true that there are actually 3 domains to consider?

    1. The code on the local machine

    不幸的是,我不确定您的意思是什么。体积映射?
    1. The Docker containers ran by PhpStorm -> I can run tests via PhpStorm

    PhpStorm确实在使用“帮助”容器来运行测试。
    1. The Docker containers ran by docker-compose up -> I can see the website

    是?..

    why I don't have port conflicts between the PhpStorm Docker containers and my own ran by docker-compose up


    您能更具体一点吗?您是如何设置端口的?哪些端口应该冲突?您如何测试没有冲突?

    These questions started popping up while configuring the tests


    您面临一些特定的问题吗?

    关于docker - PhpStorm是否在后台运行自己的Docker容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53682335/

    相关文章:

    docker - 有没有办法杀死挂起 “stop”和 “kill”的docker容器?

    docker - 容器与主机( native )性能

    flutter - 在 flutter 的容器底部添加阴影?

    docker - 每次重新启动机器时都会出现 Docker 错误 : "Cannot connect to the Docker daemon at unix:///var/run/docker.sock."

    docker - 命令选项在docker-compose.yaml中被忽略

    maven - 如何避免 IntelliJ IDEA 中出现 "The package is not exported by the bundle dependencies"错误?

    macos - 如何在 Mac 上运行 Tomcat 作为 Intellij Idea 的外部工具

    azure - docker 容器重启中的 RavenDB 在 Linux 虚拟机上失去连接

    python - Docker 错误 2002 SQLAlchemy

    intellij-idea - IntelliJ 不保存 cookie