V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
snailya
V2EX  ›  Docker

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

  •  
  •   snailya · Jun 9, 2022 · 2003 views
    This topic created in 1422 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   ·   2432 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    ♥ Do have faith in what you're doing.