Update mdbook & add graphviz support
We add the handy mdbook-graphviz plugin, which allows us to include inline DOT diagrams in our manuals. Nice!
This commit is contained in:
parent
441e6222bb
commit
2e1bf11f3c
16
Dockerfile
16
Dockerfile
|
@ -24,6 +24,7 @@ RUN apt-get update && \
|
||||||
curl \
|
curl \
|
||||||
file \
|
file \
|
||||||
git \
|
git \
|
||||||
|
graphviz \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
musl-tools \
|
musl-tools \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
|
@ -37,11 +38,16 @@ RUN apt-get update && \
|
||||||
&& \
|
&& \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
useradd rust --user-group --create-home --shell /bin/bash --groups sudo && \
|
useradd rust --user-group --create-home --shell /bin/bash --groups sudo && \
|
||||||
MDBOOK_VERSION=0.2.1 && \
|
MDBOOK_VERSION=0.3.6 && \
|
||||||
curl -LO https://github.com/rust-lang-nursery/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-musl.tar.gz && \
|
curl -LO https://github.com/rust-lang-nursery/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
|
||||||
tar xf mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-musl.tar.gz && \
|
tar xf mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
|
||||||
mv mdbook /usr/local/bin/ && \
|
mv mdbook /usr/local/bin/ && \
|
||||||
rm -f mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-musl.tar.gz
|
rm -f mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz && \
|
||||||
|
DENY_VERSION=0.6.6 && \
|
||||||
|
curl -LO https://github.com/EmbarkStudios/cargo-deny/releases/download/$DENY_VERSION/cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl.tar.gz && \
|
||||||
|
tar xf cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl.tar.gz && \
|
||||||
|
mv cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl/cargo-deny /usr/local/bin/ && \
|
||||||
|
rm -rf cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl cargo-deny-$DENY_VERSION-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
|
||||||
# Static linking for C++ code
|
# Static linking for C++ code
|
||||||
RUN sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++"
|
RUN sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++"
|
||||||
|
@ -138,7 +144,7 @@ ENV OPENSSL_DIR=/usr/local/musl/ \
|
||||||
# We include cargo-audit for compatibility with earlier versions of this image,
|
# We include cargo-audit for compatibility with earlier versions of this image,
|
||||||
# but cargo-deny provides a super-set of cargo-audit's features.
|
# but cargo-deny provides a super-set of cargo-audit's features.
|
||||||
RUN cargo install -f cargo-audit && \
|
RUN cargo install -f cargo-audit && \
|
||||||
cargo install -f cargo-deny && \
|
cargo install -f mdbook-graphviz && \
|
||||||
rm -rf /home/rust/.cargo/registry/
|
rm -rf /home/rust/.cargo/registry/
|
||||||
|
|
||||||
# Expect our source code to live in /home/rust/src. We'll run the build as
|
# Expect our source code to live in /home/rust/src. We'll run the build as
|
||||||
|
|
|
@ -49,7 +49,7 @@ compile [examples/using-diesel](./examples/using-diesel).
|
||||||
|
|
||||||
You may be able to speed up build performance by adding the following `-v` commands to the `rust-musl-builder` alias:
|
You may be able to speed up build performance by adding the following `-v` commands to the `rust-musl-builder` alias:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
-v cargo-git:/home/rust/.cargo/git
|
-v cargo-git:/home/rust/.cargo/git
|
||||||
-v cargo-registry:/home/rust/.cargo/registry
|
-v cargo-registry:/home/rust/.cargo/registry
|
||||||
-v target:/home/rust/src/target
|
-v target:/home/rust/src/target
|
||||||
|
@ -79,7 +79,7 @@ This library also sets up the environment variables needed to compile popular Ru
|
||||||
This image also supports the following extra goodies:
|
This image also supports the following extra goodies:
|
||||||
|
|
||||||
- Basic compilation for `armv7` using `musl-libc`. Not all libraries are supported at the moment, however.
|
- Basic compilation for `armv7` using `musl-libc`. Not all libraries are supported at the moment, however.
|
||||||
- [`mdbook`][mdbook] for building searchable HTML documentation from Markdown files. Build manuals to use alongside your `cargo doc` output!
|
- [`mdbook`][mdbook] and `mdbook-graphviz` for building searchable HTML documentation from Markdown files. Build manuals to use alongside your `cargo doc` output!
|
||||||
- [`cargo audit`][audit] to check your Rust project for known security issues.
|
- [`cargo audit`][audit] to check your Rust project for known security issues.
|
||||||
|
|
||||||
## Making OpenSSL work
|
## Making OpenSSL work
|
||||||
|
|
Loading…
Reference in a new issue