Skip to main content
Version: v4 (current)

Custom Images

Build Unity editor Docker images with custom module combinations using the GameCI CLI.

Why Custom Images?

The pre-built unityci/editor images ship with a single module per image (e.g. android, windows-mono, linux-il2cpp). Some projects need multiple modules installed together — for example, when third-party packages like Wwise or FMOD include native plugins for multiple platforms that Unity resolves during the import phase.

Quick Start

# Install the CLI
curl -fsSL https://raw.githubusercontent.com/game-ci/cli/main/install.sh | sh

# Build a desktop combo image (Windows + Linux IL2CPP + Mac)
game-ci build-unity-image ubuntu windows-mono,linux-il2cpp,mac-mono \
--unity-version 2022.3.20f1

# Build and push to your registry
game-ci build-unity-image ubuntu windows-mono,linux-il2cpp \
--unity-version 2022.3.20f1 \
--tag ghcr.io/my-org/unity-editor:desktop \
--push

Usage

game-ci build-unity-image [baseOs] [modules] [options]

Positional Arguments

ArgumentDefaultDescription
baseOsubuntuBase operating system (ubuntu or windows)
modulesbaseComma-separated Unity modules to install

Options

FlagDefaultDescription
--unity-version(required)Unity editor version (e.g. 2022.3.20f1)
--changeset(auto-resolved)Unity changeset hash
--tag(auto-generated)Docker image tag
--pushfalsePush image to registry after building
--hub-imageunityci/hubHub base image
--base-imageunityci/baseEditor base image

Available Modules

ModuleDescription
baseEditor only (Linux Mono built-in)
linux-il2cppLinux IL2CPP build support
windows-monoWindows Mono build support
mac-monomacOS Mono build support
iosiOS build support
androidAndroid build support
webglWebGL build support

GitHub Actions Example

On-the-fly (with caching)

Build the image as a CI step. Docker layer caching makes subsequent runs fast:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install GameCI CLI
run: curl -fsSL https://raw.githubusercontent.com/game-ci/cli/main/install.sh | sh

- name: Build custom Unity image
run: |
game-ci build-unity-image ubuntu windows-mono,linux-il2cpp \
--unity-version 2022.3.20f1 \
--tag unity-editor:desktop

- uses: game-ci/unity-builder@v4
with:
customImage: unity-editor:desktop
targetPlatform: StandaloneWindows64

Pre-built (push once, pull forever)

Build and push the image to a registry once, then reference it in all builds:

# Run once (or on a schedule)
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Install GameCI CLI
run: curl -fsSL https://raw.githubusercontent.com/game-ci/cli/main/install.sh | sh

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
run: |
game-ci build-unity-image ubuntu windows-mono,linux-il2cpp \
--unity-version 2022.3.20f1 \
--tag ghcr.io/${{ github.repository_owner }}/unity-editor:desktop \
--push

Then in your build workflow:

- uses: game-ci/unity-builder@v4
with:
customImage: ghcr.io/my-org/unity-editor:desktop
targetPlatform: StandaloneWindows64

Common Combinations

NameModulesUse case
Desktopwindows-mono,linux-il2cpp,mac-monoWwise/FMOD, Steam multi-platform
Desktop + Androidwindows-mono,linux-il2cpp,androidMeta Quest + PC VR
Mobileandroid,iosMulti-platform mobile

How It Works

The CLI generates a Dockerfile that mirrors the game-ci/docker build pipeline, including all version-specific patches:

  • Android SDK setup (2018.x legacy through 6000+)
  • IL2CPP build tool fixes (2019.3.x)
  • WebGL dependencies (python2, ffmpeg, brotli, build-essential)
  • Mac-mono symlink fixes (2021-2022)
  • Server module auto-installation (2021.2.5+)

The generated image is identical to what game-ci/docker CI produces.