Last active
June 28, 2026 08:00
-
-
Save Baekalfen/2e996d3b0568e32d676d34c55f3a067c to your computer and use it in GitHub Desktop.
Dockerfile for compiling with GBDK 2020 in 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:26.04 | |
| SHELL ["/bin/bash", "-c"] | |
| RUN apt update && apt install -y git build-essential curl | |
| # SDCC with patches | |
| WORKDIR /sdcc/ | |
| RUN curl -LO https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-patched-gbdk-4.5.0/sdcc-15267-Linux-x64.tar.gz | |
| RUN tar xvf sdcc-15267-Linux-x64.tar.gz | |
| ENV SDCCDIR=/sdcc/sdcc | |
| # GBDK | |
| RUN git clone https://github.com/gbdk-2020/gbdk-2020 /gbdk | |
| WORKDIR /gbdk | |
| ENV GBDKDIR=/gbdk/ | |
| RUN make | |
| RUN make install | |
| ENV GBDKDIR=/opt/gbdk/ | |
| ENV PATH=/opt/gbdk/bin:$PATH | |
| # Build your project | |
| WORKDIR /project | |
| # Defaults to building with 'make'. Change to 'bash' for interactive session | |
| ENTRYPOINT make | |
| # Build: sudo docker build -t gbdk . | |
| # Run: sudo docker run -it -v ${PWD}/:/project gbdk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment