]> git.armaanb.net Git - dockerfiles.git/commitdiff
add mdbook
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Tue, 10 Nov 2020 16:44:33 +0000 (11:44 -0500)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Tue, 10 Nov 2020 16:44:33 +0000 (11:44 -0500)
mdbook/README.md [new file with mode: 0644]
mdbook/latest/Dockerfile [new file with mode: 0644]

diff --git a/mdbook/README.md b/mdbook/README.md
new file mode 100644 (file)
index 0000000..4940139
--- /dev/null
@@ -0,0 +1,5 @@
+# mdBook
+
+WARNING: This is probably not the most recent version of mdBook, as I do not maintain this image very actively.
+
+Runs [mdBook](github.com/rust-lang/mdBook/) in a docker container. To use, you need to mount an initialized book to `/book` in the docker container. You can initialize a book using `docker run -v PATH/TO/BOOK:/book armaanb/mdbook mdbook init`. Then serve it using `docker run -v PATH/TO/BOOK:/book -p 3000:3000 armaanb/mdbook`
diff --git a/mdbook/latest/Dockerfile b/mdbook/latest/Dockerfile
new file mode 100644 (file)
index 0000000..2897bc6
--- /dev/null
@@ -0,0 +1,7 @@
+FROM rust as builder
+RUN cargo install mdbook
+
+FROM debian:buster-slim
+COPY --from=builder /usr/local/cargo/bin/mdbook /bin/mdbook
+WORKDIR /book
+CMD mdbook serve -n 0.0.0.0