question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we continue supporting building Linux container images under Windows?

See original GitHub issue

I’ve never attempted to build Linux container images under Windows with ue4-docker myself (I always use native Linux for this), but I’ve been seeing a number of questions lately from users who are doing so and it’s become evident that the WSL2 backend for Docker Desktop under Windows suffers from a couple of limitations that make it poorly suited to this use case:

  • As encountered in #203 and discussed upstream in https://github.com/microsoft/WSL/issues/4901, network speeds inside WSL2 can be extremely slow depending on the configuration of the host Windows system. This is far from ideal when building container images that download many gigabytes of source code and binary dependencies.

  • As encountered by users who have been attempting to build the generated Dockerfiles for ue4-minimal that ship with Unreal Engine 4.27, the default disk size for the WSL2 backend is too small to build images with ue4-docker. Unlike the old Hyper-V backend, the WSL2 backend does not provide an easy way to increase the disk space available to the Docker daemon, which means users need to follow the fairly involved set of steps documented in https://github.com/docker/for-win/issues/9672 before they can build images.

Users can of course configure Docker Desktop to use the legacy Hyper-V backend rather than the WSL2 backend, but the newer backend provides better UX (for non ue4-docker use cases) and receives active feature updates and maintenance, so it’s probably safe to assume that users will prefer to use WSL2 going forward.

Given these limitations and the poor user experience that they cause, I can see two potential options to address the problem:

  • Drop support: adopt the position that this is an unsupported configuration and advise users against it.

  • Improve support: thoroughly document the problems and their resolutions, and potentially investigate ways to automate the expansion of the WSL2 disk size so we can perform this step in the ue4-docker setup command.

@slonopotamus @TBBle what do you think?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TBBlecommented, Sep 21, 2021

Microsoft doesn’t support Docker Desktop at all; Docker, Inc. supports Docker Desktop, it’s their product.

As it happens, Microsoft do support Docker Engine on Windows Server, by licensing Mirantis Container Runtime, (formerly Docker Enterprise) from Mirantis for Windows Server licensees. However, this does not support Linux containers, as the Docker Desktop WSL2 or Hyper-V backends are not present.

Microsoft support LCOW (at least, they’re still fixing bugs and adding features) but Docker have dropped or deprecated their LCOW experimental integration (HCS v1), and so LCOW is basically moribund until at least Docker moves to containerd on Windows (integrating HCS v2), and the LCOW integration in Docker is redone against containerd, assuming someone is sufficiently motivated to own that bridging work. My guess is that MS themselves are using LCOW and containerd under containerd-cri for Kubernetes, so Docker integration may not be a high priority for them.

1reaction
slonopotamuscommented, Sep 21, 2021

So any such output would be best-effort, but that should be good enough to catch low-hanging fruit, i.e. “Ooops, I left Docker Desktop in Linux Containers mode”.

That cannot happen. You have to explicitly pass --linux to ue4-docker build to tell that you want to build Linux engine on a Windows host.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Linux containers on Windows is a big deal - TechTarget
Although it's tempting to think that a container is just a container, there are key differences between Linux and Windows containers.
Read more >
Windows Container Version Compatibility | Microsoft Learn
Version compatibility for containers built from different versions of Windows Server and Windows.
Read more >
Windows containers in a Linux world - Intercept cloud
But that does mean something. Where we are used to having a wide variety of options of images when it comes to Linux...
Read more >
Building Windows multi-arch container images on Linux
When running Windows containers the container host version must match the image version. For container image publishers this often ...
Read more >
Docker For Windows: Create a Linux Container on Windows 10
Windows 10 contains built in support for Windows Containers and Hyper-V Containers. Additionally, you can run Linux containers using Hyper-V ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found