commit f2a4d4e77c1996c435e95a0cbb20df271682c960 Author: PikalaxALT Date: Mon Apr 27 21:05:50 2026 -0400 Initial commit diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..fb08a49 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,37 @@ +name: Build Docker container + +permissions: + packages: write + +on: + push: + workflow_dispatch: + +jobs: + docker-build: + runs-on: ubuntu-22.04 + if: ${{ github.repository == 'pret/dsbuild' }} + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Login to GHCR + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 + - name: Get short sha + id: short-sha + run: | + echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build and push + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0 + with: + push: ${{ github.actor != 'nektos/act' }} + tags: | + ghcr.io/pret/dsbuild:latest + ghcr.io/pret/dsbuild:${{ steps.short-sha.outputs.short-sha }}-${{ github.run_number }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3255857 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# check=skip=FromPlatformFlagConstDisallowed +FROM --platform=linux/amd64 ubuntu:22.04 +LABEL com.docker.image.name=ghcr.io/pret/dsbuild \ + org.opencontainers.image.source=https://github/pret/dsbuild \ + org.opencontainers.image.description="Ubuntu image wrapping wine32, suitable to run the Nintendo DS compiler" \ + org.opencontainers.image.authors="pret" + +RUN apt-get -y update \ + && apt-get -y install \ + ca-certificates \ + software-properties-common \ + && add-apt-repository ppa:ubuntu-toolchain-r/test -y \ + && apt-get -y --allow-downgrades install \ + g++-10-multilib \ + linux-libc-dev \ + binutils-arm-none-eabi \ + p7zip-full \ + pkg-config \ + libpugixml-dev \ + ppa-purge \ + wget \ + lsb-release \ + make \ + git \ + build-essential \ + python3 \ + libpng-dev \ + unzip \ + sudo \ + && { ppa-purge -y ppa:ubuntu-toolchain-r/test || true; } \ + && dpkg --add-architecture i386 \ + && mkdir -pm755 /etc/apt/keyrings \ + && wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key \ + && add-apt-repository ppa:cybermax-dexter/sdl2-backport \ + && wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources \ + && apt-get update \ + && apt-get install --install-recommends --allow-downgrades -y winehq-stable \ + && hash -r + +ENTRYPOINT [ "/bin/bash" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..8dffc08 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +This repository builds a Docker image wrapping 32-bit wine and containing all dependencies needed to build Nintendo DS ROMs from source. + +```bash +docker exec -v $(pwd):/work -w /work ghcr.io/pret/dsbuild:latest wine tools/mwccarm/2.0/sp2p2/mwccarm.exe ... +``` + +For contacts and other pret projects, see [pret.github.io](https://pret.github.io/). +