- Home /
Running Unity editor in batch mode on Windows Server Core in Docker
I've got Unity 5.6.0f3 installed in my container, but I can't get the Unity editor to launch at all. It seems to fail to run without logging anything to file or the Windows Event logs. Below is my slightly redacted docker run command. Note that I've also tried to run the command while attached to the container and see the issue as well.
Anyone have any ideas what might be failing?
docker run -v :d: "C:\Program Files\Unity\Editor\Unity.exe" -batchmode -nographics -quit -executeMethod -projectPath "d:\" -logFile "d:\UnityLogs.txt"
This is different from the following because I'm not trying to run a headless Unity server, but Unity itself. http://answers.unity3d.com/questions/1341355/unity-headless-server-on-windows-server-core-docke.html
I have this issue on Windows Server Core running directly in Hyper-V. No containers or docker necessary to reproduce it.
I've been walking the same path recently. The farthest point I've reached is seeing something in the EventLog. To be specific, it's System log and there a few entries about missing dlls. Such as Opengl32, glew32, and a couple more. However, importing those manually produces a new message saying that it simply cannot start the process. Exact error messages I don't remember, I'm on my phone. If someone finds it interesting I can reproduce it.
Answer by VanessaAraujo · Sep 23, 2017 at 06:47 PM
Hi @jowitt_msft . Did you solve your issue? I'm facing the same problem as you... no logs from Unity launch running on batchmode on docker container...
After reaching out to several $$anonymous$$ms about this issue it sounds as simple as you'd guess - some vital dependencies of Unity are missing from Nano and Core and that Unity would need to investigate further. I expected -nographics to avoid those dependencies, but I guess not. We've effectively abandoned running Unity in containers and rely on Windows Server 2016 V$$anonymous$$s. =(
@jowitt_msft Thanks for digging this up. I'm in the same situation myself, was really hoping to move our build process to Docker but looks like that will need to wait.
Answer by OlegKorotkov · Jan 12, 2018 at 04:38 PM
Is there any new about it? I'm trying to do the same but no luck and I've found your answer here. Maybe you have some progress on it.
Unfortunately nothing to update here. Sad to see the issue persists. If you find a way around it, please let us know here!
I ended up trying to achieve the same, only to find that this question is still open. Any news so far?
I think you guys better be using linux base images for this. I gave up investigating core server problems. I believe currently its a dead end. All versions of Unity work perfect with ubuntu base images. I am currently using a custom docker image (based on ubuntu 16.04) for building my projects for Android and iOS in AzureDevOps. If someone is interested in this I can give further info.
@george_vasilchenko I'm interested in any info you have to share, thanks. Also why do you believe it's a dead end? It would save me a lot of wasted time if I knew now that it's guaranteed to fail.
@sad_pd_unity well there is no 100% guarantee that Windows server core will fail but so far I was not able to find a decent working example or an article that tells about one. I tried myself to deploy such thing and it failed as mentioned above with no clear error. I was desperately inspecting the event log, trying to log unity build somewhere in a file, everything was kinda for nothing. I don't exactly remember what were the errors but definitely nothing to make much sense from. The reason I started this is CD CI pipeline for the games. Since having a full Windows server machine with unity installed is quite expensive, I chose Linux and docker. If you are interested in the way to set it up I can tell what are the steps. But it takes some effort.
Answer by Solid123 · Jun 23, 2020 at 03:29 PM
Hi, can I have some information about your setup for the cloud builder? I’m currently working on something like yours, I have started a new instance on AWS (EC2) and I download and installed a version of Unity Editor.
When I try to launch a new project, the editor crash at the loading screen, this will appear for each project then I try to open. So I try to run Unity from the command line with the following details: "Unitypath" -batchmode -nographics -quit -projectPath "project_path" -executeMethod AssetBundleCreator.InizializeAndBuildAssetBundle -logFile "logfile_path" -modelName 174 -modelLod 2 -outputPath "assetbundler_out_path”. This mthod this time open the project correctly but keep still stuck on the attempt to load the models.
Current server setup:
OS: ubuntu 18.04 Unity Version: 2019.4 Ram: 4Gib CPU: 2 virtual core
Your answer
![](https://koobas.hobune.stream/wayback/20220612121355im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity Collaborate CLI 1 Answer
Building iOS via the Terminal 0 Answers
Unet: Pass player script component from client to server 0 Answers
Unity3D Command line Build not accessing libraries and updating Android Manifest 1 Answer
No serial number - Unity Personal - needed for CLI integration 0 Answers