-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
36 lines (27 loc) · 929 Bytes
/
Dockerfile
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
ARG VERSION=${VERSION:-[VERSION]}
FROM allfunc/rust-musl-crate AS builder
ARG VERSION
COPY ./docker/mybook /home/rust/src/
RUN cargo bin --install
FROM plantuml/plantuml
ARG RUST_VER=1.81.0
COPY --from=builder \
/home/rust/src/.bin/rust-${RUST_VER}/mdbook/0.4.40/bin/mdbook \
/home/rust/src/.bin/rust-${RUST_VER}/mdbook-plantuml/0.8.0/bin/mdbook-plantuml \
/home/rust/src/.bin/rust-${RUST_VER}/mdbook-toc/0.14.2/bin/mdbook-toc \
/home/rust/src/.bin/rust-${RUST_VER}/mdbook-mermaid/0.14.0/bin/mdbook-mermaid \
/usr/local/bin/
# init packages
# apk
COPY ./install-packages.sh /usr/local/bin/install-packages
RUN INSTALL_VERSION=$VERSION install-packages \
&& rm /usr/local/bin/install-packages
# init workdir
WORKDIR /mdbook
COPY ./mdbook-demo /mdbook
ENV PORT=80 \
HOME=/mdbook
COPY ./docker/do-touch /usr/local/sbin/
COPY ./docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["server"]