From 6212faf77f8f82b6cce1bde66d8ccdfd03e506ba Mon Sep 17 00:00:00 2001 From: Les-Wet Date: Wed, 8 Apr 2026 18:09:58 +0200 Subject: [PATCH 1/2] Added Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..cdde24e4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Get simple debian image +FROM debian:latest +LABEL org.opencontainers.image.source=https://github.com/gbdev/gb-asm-tutorial +SHELL ["bash", "-lc"] +RUN apt update +RUN apt install curl -y + +# Install rust and mdbook +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN apt install gcc -y +RUN source "$HOME/.cargo/env" +RUN cargo install mdbook@0.4.52 + +COPY . /code +WORKDIR /code + +# Serve gb-asm-tutorial +# See https://github.com/rust-lang/mdBook/issues/2226 +RUN mdbook build +CMD mdbook serve --hostname 0.0.0.0 & mdbook watch \ No newline at end of file From 151a96d176293a1e66d67fe2b84908cfb6bc8320 Mon Sep 17 00:00:00 2001 From: Les-Wet Date: Wed, 8 Apr 2026 18:33:52 +0200 Subject: [PATCH 2/2] Update README with docker information --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 9c6b281f..a9b688d0 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ You can read it at https://gbdev.io/gb-asm-tutorial/. Contributing is really easy, fork this repo and edit the files in the **src** directory. Then, you can send your PR. +### Deploy Locally + To deploy gb-asm-tutorial locally: 1. Install [Rust](https://www.rust-lang.org/tools/install) and [mdBook](https://github.com/rust-lang/mdBook#readme) (v0.4.x). @@ -28,6 +30,27 @@ mdbook build mdbook watch ``` +### Deploy with Docker + +If you have [Docker installed](https://docs.docker.com/engine/install/), you can build the Docker image with: + +```sh +docker build -t gb-asm-tutorial . +``` + +Then run the image with: + +```sh +docker run -p 3000:3000 \ + --mount "type=bind,source=$(pwd)/preproc,target=/code/preproc" \ + --mount "type=bind,source=$(pwd)/renderer,target=/code/renderer" \ + --mount "type=bind,source=$(pwd)/src,target=/code/src" \ + --mount "type=bind,source=$(pwd)/theme,target=/code/theme" \ + -it gb-asm-tutorial +``` + +That's it! gb-asm-tutorial is live at [localhost:3000](https://localhost:3000). + ## Translating To help translate the tutorial, join the [project on Crowdin](https://crowdin.com/project/gb-asm-tutorial).