-
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.
simplify the action to just use the pre-built mdbook image
- Loading branch information
Showing
1 changed file
with
1 addition
and
35 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,44 +1,10 @@ | ||
# Container image that runs your code | ||
FROM rust:1.66.1-slim | ||
|
||
# Version numbers for all the crates we're going to install | ||
ARG MDBOOK_VERSION="0.4.25" | ||
ARG MDBOOK_LINKCHECK_VERSION="0.7.7" | ||
|
||
ARG MDBOOK_TOC_VERSION="0.7.0" | ||
ARG MDBOOK_OPEN_ON_GH_VERSION="2.3.1" | ||
ARG MDBOOK_KROKI_VERSION="0.1.2" | ||
ARG MDBOOK_REGEX_VERSION="0.0.2" | ||
ARG MDBOOK_ADMONISH_VERSION="1.8.0" | ||
ARG MDBOOK_TOC_VERSION="0.11.0" | ||
|
||
ENV CARGO_INSTALL_ROOT /usr/local/ | ||
ENV CARGO_TARGET_DIR /tmp/target/ | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y libssl-dev pkg-config ca-certificates build-essential make perl gcc libc6-dev | ||
|
||
RUN cargo install mdbook --vers ${MDBOOK_VERSION} --verbose | ||
RUN cargo install mdbook-linkcheck --vers ${MDBOOK_LINKCHECK_VERSION} --verbose | ||
RUN cargo install mdbook-kroki-preprocessor --vers ${MDBOOK_KROKI_VERSION} --verbose | ||
RUN cargo install mdbook-toc --vers ${MDBOOK_TOC_VERSION} --verbose | ||
RUN cargo install mdbook-open-on-gh --vers ${MDBOOK_OPEN_ON_GH_VERSION} --verbose | ||
RUN cargo install mdbook-regex --vers ${MDBOOK_REGEX_VERSION} --verbose | ||
RUN cargo install mdbook-admonish --vers ${MDBOOK_ADMONISH_VERSION} --verbose | ||
|
||
# Create the final image | ||
FROM ubuntu:20.04 | ||
FROM ghcr.io/input-output-hk/catalyst-gh-mdbook-doc:main | ||
|
||
LABEL maintainer="[email protected]" | ||
ENV RUST_LOG info | ||
|
||
# used when serving | ||
EXPOSE 3000 | ||
|
||
COPY --from=build /usr/local/bin/mdbook* /bin/ | ||
|
||
# Make sure we have certs | ||
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates && rm -rf /var/cache/apt/lists | ||
|
||
|
||
ENTRYPOINT [ "/bin/mdbook" ] |