forked from hardhackerlabs/medup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 662 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 662 Bytes
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
FROM rust:1.67.1-slim-buster as build
RUN USER=root cargo new --bin medup
WORKDIR /medup
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN cargo build --release && rm -r ./src
COPY ./src ./src
COPY ./docs ./docs
COPY ./themes ./themes
RUN rm ./target/release/deps/medup* && cargo build --release
FROM rust:1.67.1-slim-buster
COPY --from=build /medup/target/release/medup ./medup/
COPY --from=build /medup/docs ./medup/docs/
COPY --from=build /medup/themes ./medup/themes/
EXPOSE 8181
ENTRYPOINT [ "/medup/medup" ]
CMD ["serve", "--config-path", "/medup/themes/notion/config.json", "--dir", "/medup/docs", "--static-dir", "/medup/themes"]