Dockerize Unreal Engine 4 for Linux

I am wondering if it would be possible to dockerize Unreal Engine 4 into a docker container.

I suspect it’s probably not possible without some hardwork, but over all I think it might be a solution to the problem of getting UE4 to run on different linux distros.

In general, Docker doesn’t virtualize graphics hardware in the way that VMWare Workstation does.

However: If you will only ever run one Docker instance using the graphics hardware (so, no host X windows,) then you could perhaps export the devfs into the docker container and run X and Unreal Engine on the “inside” of that container with direct hardware access.

There’s not a super big difference between this, and just providing a basic Linux image with UE pre-installed, though :slight_smile:

We’re pretty light-weight in terms of requirements of UE4 binaries, the problems with running on the different distros so far - putting aside build-time problems with too old mono, misused gold linker or broken for some reason clang 3.4, which are applicable if you’re building from sources - were differences between window managers (not strictly a distro-specific thing). Also, for some older distros (think CentOS 6.x or Debian-stable) getting up to date graphics drivers may eventually become a problem too, depending on your hardware. The safest bet is to use latest (K)Ubuntu for development.

I have dockerize the UE4 in docker. You can check out my repo at GitHub - tweakmy/ue4-in-docker: Ease of build for ue4 for people who only wants to play with ue4editor.

That just simplify the distribution. At the moment, in the Linux there is so much diverse in the gtk, qt, library and window manager(which translate more bugs). By dockerizing, in my point of view, somehow, we could converge in a same distribution(and have the same error) and the developer can choose whatever they most feel comfortable except they might not be comfortable using Docker which is totally understandable. We (as user) don’t even need to build again and again to get it running on our machine which is a waste of time. This will be much the same approach as download binaries for Mac and Windows which is not possible yet for Linux user.

Please contribute to my repo or create an official repo, so I could dig in and contribute to you.

I have not been able to run kdevelop on using dockerize somehow not sure why yet.

I have am able to dockerize the codelite and build UE4Editor but it is still imperfect.

Not true.

On Unic machine there is no virtualization, and you can access directly nvidia hardware accelerator using nvidia docker GitHub - NVIDIA/nvidia-docker: Build and run Docker containers leveraging NVIDIA GPUs.

I don’t know an equivalent for Windows or ATI, but I think this (http://gernotklingler.com/blog/howto-get-hardware-accelerated-opengl-support-docker/) may work.

Where is this limitation coming from? From what I know about Docker is that docker utilizes Linux containers to “virtualize” an operating system as a process. Running on Linux it will just take the minimum amount of packages needed to run that OS and what would have been handled by the VMWare hypervisor is handled within the process. Although a process will take RAM for its heap it will share the available resources with the host and other containers. My knowledge of Unreal Engine is limited, I am not suggesting you are wrong, but purely looking at docker I would assume that the hardware virtualization (even though there may be some stuff one could run into) should be something that docker can handle. And more efficiently than having to deal with the hypervisor in between.

I have a home server that I use to a few docker clusters for development. I am thinking about getting a titan X just to offload compiling to the server since most clusters are idle when I am working on something else. Spinning up a cluster should allow me to utilize most of the resources. I would be kind of grateful to know about such virtualization issues before I get the titan lmao.

Kind regards,

Docker virtualizes file systems, processes, networking, and CPU/memory resources. (And even the network virtualization is not true virtualization, but rather more like additional bridging/routing rules.)

As I said, Docker does not virtualize the graphics device. Nor, for that matter, the audio device, or even the USB input devices like mouse and keyboard.

We can dockerize the dedicate server. here is the recording I made, https://youtu.be/gI_9_f1BpLA