snailya
V2EX  ›  Docker

请问 Docker compose 有没有办法同时运行 Linux 和 windows 容器?

  •  
  •   snailya · Jun 9, 2022 · 2102 views
    This topic created in 1463 days ago, the information mentioned may be changed or developed.

    不太会用 Docker

    微服务中,有一个转换格式的服务必须要用到第三方 exe 程序,因此需要从 mcr.microsoft.com/windows/nanoserver 构建镜像。但是其他服务又是基于 linux 容器运行的。

    在 Google 上搜索mix platform的回答,不太理解答主列出的三点是 list 还是 step:

    • 按 list - 有三种实现方法:

      1. 分别在 linux 和 windows 下 build 镜像并运行;
      2. 在 windows 下拉 linux 和 windows 下已经 build 好的镜像来运行;
      3. 在 windows 平台下使用 platform 标记 docker-compose.yml 中的服务
    • 按 step - 分别在 linux 和 windows 下 build 镜像,再切换到 windows 拉取??还是到 docker-compose.yml 中拉取同时标记 platform ?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3098 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:57 · PVG 20:57 · LAX 05:57 · JFK 08:57
    ♥ Do have faith in what you're doing.