question

Szanka Attila Peter avatar image
Szanka Attila Peter asked

Debug Unity Linux server container on Windows locally

Hi!

Im trying to debug my linux server build locally but I can't find any good step-by-step instructions.
(My Windows build works perfectly with LocalMultiplayerAgent.exe)

As far as I know I need a 'dockerfile' in my build folder but what should be in it? Any example?
Also need a wsl2 linux distribution on windows (?)


Somehow I was able to start my linux container but immediately stopped with this error: "Environment variable GSDK_CONFIG_FILE not defined"

So my question is, how could I make it work? Does anyone has a proper instruction set?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JayZuo avatar image
JayZuo answered

So do I have to use the Hyper-V?

Currently, we'd recommend using Linux containers in WSL 2 mode. See Docker Desktop WSL 2 backend.

What is my registry? Where can I find that?

You can use any registry you'd like. But for convenience, we'd suggest using the Azure container registry like Get your PlayFab container registry login credentials, "customer5555555.azurecr.io" is the registry.

The command needs a dockerfile but what should it contain?

This depends on your own project. We have some samples at PlayFab/MpsSamples. For more details about Docker containers, please see

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

Have you checked the instructions here? MpsAgent/lcow.md at main PlayFab/MpsAgent (github.com)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Szanka Attila Peter avatar image
Szanka Attila Peter answered

Yes but this is not clear enough for me.

  • You should mount one of your hard drives, instructions here

According to the instructions:
"The Advanced tab is only available in Hyper-V mode, because in WSL 2 mode and Windows container mode these resources are managed by Windows. In WSL 2 mode, you can configure limits on the memory, CPU, and swap size allocated to the WSL 2 utility VM."

So do I have to use the Hyper-V?

in: LocalMultiplayerSettings.json

ContainerStartParameters": {
        "ImageDetails": {
            "Registry": "mydockerregistry.io",
            "ImageName": "mygame",
            "ImageTag": "0.1",
            "Username": "",
            "Password": ""
        }
    }

What is my registry? Where can I find that?

  1. Modify imageDetails with your game server docker image details. Image may be built locally (using docker build command) or be hosted in a remote container registry.

I could build the container image but what is the proper way? The command needs a dockerfile but what should it contain?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.