feat: Added simple Docker build support for Mac/Windows users.#35
feat: Added simple Docker build support for Mac/Windows users.#35skyzyx wants to merge 1 commit intoimpeeza:masterfrom
Conversation
skyzyx
commented
Apr 9, 2026
- Added Dockerfile and docker-compose.yml configuration which enables containerized builds, reducing local setup requirements.
- Updated README with build instructions for Docker alongside traditional setups, improving clarity and accessibility.
* Added Dockerfile and docker-compose.yml configuration which enables containerized builds, reducing local setup requirements. * Updated README with build instructions for Docker alongside traditional setups, improving clarity and accessibility.
There was a problem hiding this comment.
Pull request overview
Adds containerized build support to reduce local setup friction (especially for Mac/Windows users) and updates documentation accordingly.
Changes:
- Expanded README build section with submodule-clone guidance plus Docker/non-Docker build paths.
- Added a Dockerfile intended to build the project inside a devkitPro-based container.
- Added a minimal
docker-compose.ymlto run the build against the repo via bind mount.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| README.md | Documents cloning with submodules and adds Docker-based build instructions. |
| Dockerfile | Introduces a devkitPro-based build image intended to run make in /workspace. |
| docker-compose.yml | Defines a syspatch service to build using the Dockerfile with the repo mounted into the container. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,21 @@ | |||
| # syntax=docker/dockerfile:1 | |||
| FROM devkitpro/devkitarm:latest AS root | |||
There was a problem hiding this comment.
The base image devkitpro/devkitarm is for 32-bit ARM and doesn’t match this project’s Switch/libnx toolchain (AArch64). CI builds in devkitpro/devkita64 (see .github/workflows/build-jobs.yaml:11), and both sysmod/Makefile and overlay/Makefile include $(DEVKITPRO)/libnx/switch_rules and target armv8-a. Update the Dockerfile to use the devkita64 image so switch-dev and the AArch64 compiler are available and the Docker build succeeds.
| FROM devkitpro/devkitarm:latest AS root | |
| FROM devkitpro/devkita64:latest AS root |
| @@ -0,0 +1,21 @@ | |||
| # syntax=docker/dockerfile:1 | |||
| FROM devkitpro/devkitarm:latest AS root | |||
There was a problem hiding this comment.
Using the :latest tag makes Docker builds non-reproducible and can break unexpectedly when the upstream image changes. Consider pinning to a specific devkitPro image tag (or digest) that matches what CI uses so local Docker builds remain stable.
| FROM devkitpro/devkitarm:latest AS root | |
| FROM devkitpro/devkitarm:<pinned-tag> AS root |
| RUN apt-get -y update && apt-get -y upgrade && \ | ||
| apt-get -y install \ | ||
| build-essential \ | ||
| git \ | ||
| zip \ | ||
| ; |
There was a problem hiding this comment.
apt-get upgrade in the image build increases build time and reduces reproducibility (and can occasionally introduce breaking changes in the toolchain image). Prefer installing only the needed packages with --no-install-recommends and cleaning apt lists, without upgrading the full base image.
| RUN apt-get -y update && apt-get -y upgrade && \ | |
| apt-get -y install \ | |
| build-essential \ | |
| git \ | |
| zip \ | |
| ; | |
| RUN apt-get -y update && \ | |
| apt-get -y install --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| zip \ | |
| && rm -rf /var/lib/apt/lists/* |
|
|
||
| ### Without Docker | ||
|
|
||
| 1. Install [devkitARM](https://devkitpro.org/wiki/Getting_Started). |
There was a problem hiding this comment.
This instruction likely points to the wrong toolchain for Nintendo Switch builds. The project uses libnx/switch_rules and -march=armv8-a... (AArch64), so users typically need devkitPro with devkitA64 (not devkitARM). Updating the wording here will prevent failed local builds.
| 1. Install [devkitARM](https://devkitpro.org/wiki/Getting_Started). | |
| 1. Install [devkitPro with devkitA64](https://devkitpro.org/wiki/Getting_Started). |
| 1. Run: | ||
|
|
||
| ```sh | ||
| docker compose up --build |
There was a problem hiding this comment.
For a one-shot build container, docker compose up is a bit awkward because it creates/stops a named service container and may require manual cleanup/re-runs. Consider documenting docker compose run --rm syspatch (or up --abort-on-container-exit) to better match the intended “run build then exit” workflow.
| docker compose up --build | |
| docker compose run --rm syspatch |
| services: | ||
| syspatch: | ||
| build: | ||
| context: . |
There was a problem hiding this comment.
With the bind mount, the container runs as root by default, so build artifacts written into the repo (e.g., out/, build/) will be owned by root on Linux hosts. Consider setting a user: (UID:GID) in the compose service or documenting this caveat so users don’t end up with permission issues when running Docker builds locally.
| context: . | |
| context: . | |
| user: "${UID:-1000}:${GID:-1000}" |