-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.docs
40 lines (27 loc) · 1.32 KB
/
Dockerfile.docs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM nginx:1.24.0-alpine as builder
RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/main libuv \
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main nodejs npm \
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community yarn
RUN apk add --no-cache curl tar bash git musl-dev clang lld ca-certificates build-base
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh && chmod a+x rustup-init.sh && ./rustup-init.sh -y
WORKDIR /app
RUN . ~/.cargo/env && git clone https://github.com/rust-lang/mdBook && cd mdBook && cargo install --path . && cp /app/mdBook/target/release/mdbook /bin && cargo clean
RUN . ~/.cargo/env && cargo install mdbook-mermaid
RUN . ~/.cargo/env && cargo install mdbook-admonish
FROM builder
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY run.sh /app/run.sh
#RUN dos2unix /app/run.sh
RUN chmod a+x /app/run.sh
RUN mkdir -p /app/book
COPY book.toml /app/book/
COPY src /app/book/src
RUN . ~/.cargo/env && mdbook-mermaid install /app/book/
RUN . ~/.cargo/env && mdbook-admonish install /app/book/
COPY weaveapi.js /app/book
#COPY codemirror.min.js /app/book
#COPY codemirror.min.css /app/book
#COPY book.js /app/book
WORKDIR /app
EXPOSE 443
CMD ["/app/run.sh"]