代码之家  ›  专栏  ›  技术社区  ›  Hades

如何让VS2019+运行docker compose?

  •  0
  • Hades  · 技术社区  · 2 年前

    我有一个包含Azure Function应用程序的解决方案,当通过Visual Studio在本地调试/运行时,我的应用程序使用CosmosDb和其他一些服务。

    我有个码头工人。yml文件,让我在docker中加速相关服务。

    现在我得跑了 docker compose up 在Visual Studio中启动我的应用程序之前手动。

    有没有办法让Visual Studio自动运行 docker整理 当我开始调试并让它自动运行时 docker compose down 调试何时结束?

    0 回复  |  直到 2 年前
        1
  •  0
  •   AjayKumarGhose    2 年前

    有没有办法让Visual Studio自动运行docker compose 当我开始调试并让它自动运行docker时 调试结束后写下来?

    运行 docker compose up 一旦完成 docker compose build 即使创建了容器,完成操作也需要很长时间,然后尝试使用 ctrl+c 然后在VisualStudio的终端中使用下面给定的命令再次运行 docker compose up -d .

    使用 docker compose down 它需要选择删除图像的类型,如下所示。一旦提到,它将根据您的要求删除。

    enter image description here

    运行命令屏幕截图供参考:-

    enter image description here

    enter image description here

    enter image description here

    有关更多信息,请参阅以下链接:-