Skip to content

Commit

Permalink
fix docs Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmwang committed Jan 4, 2025
1 parent 19e452e commit e0619a0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
# dev
FROM rust:1.83 AS docs-dev
WORKDIR /docs

FROM rust:1.83 AS docs-deps
RUN ["cargo", "install", "mdbook", "--vers", "^0.4", "--locked"]
RUN ["cargo", "install", "mdbook-alerts"]
RUN ["cargo", "install", "mdbook-toc"]

# dev
FROM docs-deps AS docs-dev
WORKDIR /docs
COPY . .
VOLUME ["/docs"]
EXPOSE 3000
ENTRYPOINT ["mdbook", "serve", "--hostname=0.0.0.0", "--port=3000"]

# prod
FROM rust:1.83 AS docs-builder
FROM docs-deps AS docs-builder
WORKDIR /docs

RUN ["cargo", "install", "mdbook", "--no-default-features", "--features", "search", "--vers", "^0.4", "--locked"]
RUN ["cargo", "install", "mdbook-alerts"]

COPY . .
RUN ["mdbook", "build"]

Expand Down

0 comments on commit e0619a0

Please sign in to comment.