Skip to content

feat: Added simple Docker build support for Mac/Windows users.#35

Open
skyzyx wants to merge 1 commit intoimpeeza:masterfrom
skyzyx:master
Open

feat: Added simple Docker build support for Mac/Windows users.#35
skyzyx wants to merge 1 commit intoimpeeza:masterfrom
skyzyx:master

Conversation

@skyzyx
Copy link
Copy Markdown

@skyzyx 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.
Copilot AI review requested due to automatic review settings April 9, 2026 23:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to 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.

Comment thread Dockerfile
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1
FROM devkitpro/devkitarm:latest AS root
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
FROM devkitpro/devkitarm:latest AS root
FROM devkitpro/devkita64:latest AS root

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1
FROM devkitpro/devkitarm:latest AS root
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
FROM devkitpro/devkitarm:latest AS root
FROM devkitpro/devkitarm:<pinned-tag> AS root

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile
Comment on lines +8 to +13
RUN apt-get -y update && apt-get -y upgrade && \
apt-get -y install \
build-essential \
git \
zip \
;
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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/*

Copilot uses AI. Check for mistakes.
Comment thread README.md

### Without Docker

1. Install [devkitARM](https://devkitpro.org/wiki/Getting_Started).
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
1. Install [devkitARM](https://devkitpro.org/wiki/Getting_Started).
1. Install [devkitPro with devkitA64](https://devkitpro.org/wiki/Getting_Started).

Copilot uses AI. Check for mistakes.
Comment thread README.md
1. Run:

```sh
docker compose up --build
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
docker compose up --build
docker compose run --rm syspatch

Copilot uses AI. Check for mistakes.
Comment thread docker-compose.yml
services:
syspatch:
build:
context: .
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
context: .
context: .
user: "${UID:-1000}:${GID:-1000}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants