forked from peaceiris/docker-mdbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4515be6
commit 5b94804
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
ARG BASE_IMAGE | ||
|
||
FROM rust:slim AS builder | ||
FROM rust:alpine AS builder | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
musl-tools | ||
RUN apk update && \ | ||
apk add musl-dev | ||
ENV ARC="x86_64-unknown-linux-musl" | ||
RUN rustup target add "${ARC}" | ||
ARG MDBOOK_VERSION | ||
RUN cargo install mdbook --version "${MDBOOK_VERSION}" --target "${ARC}" | ||
|
||
RUN cargo install mdbook --target "${ARC}" | ||
RUN cargo install mdbook-catppuccin --target "${ARC}" | ||
|
||
FROM $BASE_IMAGE | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
COPY --from=builder /usr/local/cargo/bin/mdbook /usr/bin/mdbook | ||
COPY --from=builder /usr/local/cargo/bin/mdbook-catppuccin /usr/bin/mdbook-catppuccin | ||
|
||
WORKDIR /book | ||
ENTRYPOINT [ "/usr/bin/mdbook" ] | ||
|
||
|