Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hydroxycarbamide authored May 1, 2024
1 parent 4515be6 commit 5b94804
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
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" ]


0 comments on commit 5b94804

Please sign in to comment.