1 # syntax=docker/dockerfile:experimental
2 FROM rust:1.47-buster as rust
8 # Copy the source folders
12 RUN --mount=type=cache,target=/usr/local/cargo/registry \
13 --mount=type=cache,target=/app/target \
15 RUN --mount=type=cache,target=/app/target \
16 cp target/debug/lemmy_server lemmy_server
18 FROM rust:1.47-buster as docs
20 RUN cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git \
21 --branch localization --rev d06249b --force
23 RUN mdbook build docs/
27 # Install libpq for postgres and espeak
29 RUN apt-get install -y libpq-dev espeak
32 COPY config/defaults.hjson /config/defaults.hjson
33 COPY --from=rust /app/lemmy_server /app/lemmy
34 COPY --from=docs /app/docs/book/ /app/documentation/