To create your game server's first container build, you will need to generate your server in Linux.
Select your server then File -> Build Settings
The Build Settings window allows you to choose your target platform, adjust settings for your Build, and start the build process. To access the Build Settings window, select File > Build Settings. Once you have specified your build settings, you can click on Build to create your Build or click the Build And Run to create and run it on the platform you have specified.
In the options, select the following values using the dropdowns:
And make sure the following options are selected:
- Headless Mode
- Server Build
Once the Build is ready, let's make the docker container.
One of Edgegap's features is that it's agnostic of how you build your game executable. It just needs a reference for an OCI Image ( Docker, ContainerD), and it will be able to spin any number of servers you want. We will now get you started with creating your server running in a container.
You will find a
Dockerfile at the root folder starting with Docker. This configuration file describes how to build the image, and here are the main points to look at:
- Move the Build you created using the unity editor in a folder called build.
- Create a folder on your local machine ( If you have Docker installed )
- Create a file with no extension named "dockerfile" in this folder and paste the content shown in the example within it.
- Create a folder called build in this folder
- Copy the files generated by your Unity build into the
- Create a file called
entrypoint.shand copy the content in ( Updating your build name )
The entry point refers to the executable that will activate when a container is booting up.
We are always available to help you get started. Just send us a help request on Slack.
Now that you have a container for your game server, you can now use it with our Edgegap plugin for Unity.