V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
snailya
V2EX  ›  Docker

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

  •  
  •   snailya · 2022-06-09 11:49:43 +08:00 · 1051 次点击
    这是一个创建于 680 天前的主题,其中的信息可能已经有所发展或是发生改变。

    不太会用 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 ?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2874 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:24 · PVG 19:24 · LAX 04:24 · JFK 07:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.