1 # syntax=docker/dockerfile:experimental
3 # Warning: this will not pick up migrations unless there are code changes
4 FROM rust:1.50-buster as rust
10 # Copy the source folders
14 RUN --mount=type=cache,target=/usr/local/cargo/registry \
15 --mount=type=cache,target=/app/target \
17 RUN --mount=type=cache,target=/app/target \
18 cp target/debug/lemmy_server lemmy_server
22 # Install libpq for postgres
24 RUN apt-get install -y libpq-dev
27 COPY --from=rust /app/lemmy_server /app/lemmy