Skip to content

Commit e857d57

Browse files
committed
build: updated Dockerfile
Signed-off-by: skoowu <skoowu.fancy@gmail.com>
1 parent 1f98b01 commit e857d57

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
11
FROM rust:1.67.1-slim-buster as build
22

3-
# create a new empty shell project
43
RUN USER=root cargo new --bin medup
54
WORKDIR /medup
65

7-
# copy over your manifests
86
COPY ./Cargo.lock ./Cargo.lock
97
COPY ./Cargo.toml ./Cargo.toml
108

11-
# this build step will cache your dependencies
129
RUN cargo build --release && rm -r ./src
1310

14-
# copy your source tree
1511
COPY ./src ./src
1612
COPY ./docs ./docs
1713
COPY ./themes ./themes
1814

19-
# build for release
2015
RUN rm ./target/release/deps/medup* && cargo build --release
2116

22-
# our final base
2317
FROM rust:1.67.1-slim-buster
2418

25-
# copy the build artifact from the build stage
2619
COPY --from=build /medup/target/release/medup ./medup/
2720
COPY --from=build /medup/docs ./medup/docs/
2821
COPY --from=build /medup/themes ./medup/themes/
2922

30-
# set the startup command to run your binary
23+
EXPOSE 8181
3124
ENTRYPOINT [ "/medup/medup" ]
3225
CMD ["serve", "--config-path", "/medup/themes/notion/config.json", "--dir", "/medup/docs", "--static-dir", "/medup/themes"]

0 commit comments

Comments
 (0)