Skip to content

Dockerize the Godot Engine repository to simplify local development and contribution #12747

Open
godotengine/godot
#83791
@Ayush41

Description

@Ayush41

Describe the project you are working on

I propose adding a Dockerfile (and optionally a docker-compose setup) to the Godot Engine repository to simplify local development, testing, and contribution. This would allow developers to build and run Godot in a consistent, containerized environment — especially useful for contributors on Windows or macOS, or those new to compiling from source.

Describe the problem or limitation you are having in your project

Setting up a local development environment for contributing to the Godot Engine can be time-consuming and error-prone — especially for first-time contributors or developers on non-Linux platforms. The process requires:

  • Manually installing platform-specific build tools and dependencies.

  • Understanding and configuring the build system.

  • Handling cross-platform inconsistencies (e.g., macOS vs Linux vs Windows).

  • Repeating the setup for different target platforms (e.g., Linux, Web, Android).

This setup friction can discourage new contributors and make local development harder to maintain across machines or team members. Additionally, contributors may face version mismatches, build issues, or conflicting environments when switching between projects or machines.

  • A Docker-based solution would encapsulate all necessary dependencies and steps, making it easier to:

  • Onboard new contributors quickly.

  • Ensure consistent builds across platforms.

  • Reproduce issues or test patches in clean environments.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Adding a Dockerfile to the Godot Engine repository allows developers to build and run the engine in a pre-configured container. This eliminates the need for manual setup of dependencies and build tools, ensures environment consistency across platforms, and makes it much easier for new contributors to get started quickly with development and testing.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

✅ Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

A Dockerfile will be added to the root of the repository to define a consistent build environment using Node.js, SCons, and system dependencies. Contributors can use it to build and run the engine without configuring their local machine.

Example Dockerfile workflow:

# Build the Docker image
docker build -t godot-dev .

# Compile the engine inside the container
docker run --rm -v $(pwd):/godot godot-dev scons platform=linuxbsd

# Run the built editor
docker run -it --rm -v $(pwd):/godot godot-dev ./bin/godot.linuxbsd.editor.dev.x86_64

This approach enables anyone to build Godot locally without setting up toolchains, solving compatibility and setup issues across different OS environments.

If this enhancement will not be used often, can it be worked around with a few lines of script?

While setting up the build environment can be scripted, it still requires manual installation of dependencies across platforms, which varies between Linux, macOS, and Windows. A Docker-based setup offers a single, consistent, cross-platform solution that scripts alone can’t fully achieve. It reduces environment-related issues and streamlines onboarding, especially for first-time contributors or CI/CD pipelines.

Is there a reason why this should be core and not an add-on in the asset library?

Yes. This enhancement is meant for contributors working on the Godot Engine source code, not for game developers using the editor. Since it improves the development workflow for the engine itself, it belongs in the core repository—not the asset library, which is focused on runtime features and game development tools.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions