A container is a way of packing software and all its dependencies together in a single unit. Game Server Hosting (Multiplay) container builds allow you to package your game servers and their dependencies, build a container, and push it to the Game Server Hosting container registry.
You can create a container build through the Unity Cloud Dashboard by selecting Container image when you create a build. The Create build wizard walks you through adding a service account, adding the registry, and selecting an image. Refer to Create a build with a container image.
Game Server Hosting uses Docker container tags in the format
<ImageName>:<ImageTag>. Game Server Hosting generates the correct name and tag for your build, and displays it to you in the Unity Cloud Dashboard when you create or update a container build.
docker tag <ImageName>:<ImageTag> registry.multiplay.com/4818982f-bb28-4c39-9d44-628204b6780e/1ae4de65-849d-4ff1-86fc-1de3bdfbd891/12788:v1
Container build requirements
When you create a Game Server Hosting (GSH) build, you have several options for uploading your build file. One option is to use Docker and the GSH container registry to upload a containerized version of your build. However, your build container must meet specific requirements (in addition to the General requirements) before you can use a containerized build.
Create a container built with the base image
<tag> with the version of the base image to use. You can check the linux-base-image tags for a list of available tags.
Create a container build from scratch
If you prefer to create your Dockerfile from scratch, it’s your responsibility to ensure your container meets the following requirements.
|Your container must use |
|Your container must have an |
The following code block shows a simple Dockerfile that meets these requirements:
# ======================================================== # # Unity base image stuff # # ======================================================== # FROM ubuntu:20.04 AS mpuk RUN addgroup --gid 2000 mpukgame && \ useradd -g 2000 -u 2000 -ms /bin/sh mpukgame && \ mkdir /game && \ chown mpukgame:mpukgame /game && \ apt update && \ apt upgrade && \ apt install -y ca-certificates USER mpukgame # ======================================================== # # Custom game stuff # # ======================================================== # FROM mpuk AS game # copy game files here # for example: WORKDIR /game COPY --chown=mpukgame . . # set your game binary as the entrypoint ENTRYPOINT [ "./gamebinary" ]
If you use the base container image, the
server.json file is already mounted into your container. You can find the
server.json file location by checking the container's home environment variable.
- For Linux containers, it's in the
- For Windows containers, it's in the