File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ # Get simple debian image
2+ FROM debian:latest
3+ LABEL org.opencontainers.image.source=https://github.com/gbdev/gb-asm-tutorial
4+ SHELL ["bash" , "-lc" ]
5+ RUN apt update
6+ RUN apt install curl -y
7+
8+ # Install rust and mdbook
9+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
10+ RUN apt install gcc -y
11+ RUN source "$HOME/.cargo/env"
12+ RUN cargo install mdbook@0.4.52
13+
14+ COPY . /code
15+ WORKDIR /code
16+
17+ # Serve gb-asm-tutorial
18+ # See https://github.com/rust-lang/mdBook/issues/2226
19+ RUN mdbook build
20+ CMD mdbook serve --hostname 0.0.0.0 & mdbook watch
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ You can read it at https://gbdev.io/gb-asm-tutorial/.
88
99Contributing is really easy, fork this repo and edit the files in the ** src** directory. Then, you can send your PR.
1010
11+ ### Deploy Locally
12+
1113To deploy gb-asm-tutorial locally:
1214
13151 . 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
2830mdbook watch
2931```
3032
33+ #### Using Docker
34+
35+ If you have [ Docker installed] ( https://docs.docker.com/engine/install/ ) , you can build the Docker image with:
36+
37+ ``` sh
38+ docker build -t gb-asm-tutorial .
39+ ```
40+
41+ Then run the image with:
42+
43+ ``` sh
44+ docker run -p 3000:3000 \
45+ --mount " type=bind,source=$( pwd) /preproc,target=/code/preproc" \
46+ --mount " type=bind,source=$( pwd) /renderer,target=/code/renderer" \
47+ --mount " type=bind,source=$( pwd) /src,target=/code/src" \
48+ --mount " type=bind,source=$( pwd) /theme,target=/code/theme" \
49+ -it gb-asm-tutorial
50+ ```
51+
52+ That's it! gb-asm-tutorial is live at [ localhost:3000] ( https://localhost:3000 ) .
53+
3154## Translating
3255
3356To help translate the tutorial, join the [ project on Crowdin] ( https://crowdin.com/project/gb-asm-tutorial ) .
You can’t perform that action at this time.
0 commit comments