🐳 Fix Docker

main
_ 2020-11-27 01:07:39 +00:00
parent bbb88c01e8
commit 5f9e84f7f6
1 changed files with 7 additions and 7 deletions

View File

@ -8,12 +8,12 @@ RUN apt-get update \
# Make sure the dependencies are all cached so we won't hammer crates.io
ADD old-git.tar.gz .
RUN git checkout 151f236a0b8de510b1896deeaa9c571f845040af \
RUN git checkout bbb88c01e8ad28d256c8faf316f46d7214184ec2 \
&& git reset --hard \
&& cargo check
&& cargo check -p ptth_relay
RUN cargo test --release \
&& cargo build --release --bin ptth_relay
RUN cargo test --release --all \
&& cargo build --release -p ptth_relay
COPY .git .git
@ -22,8 +22,8 @@ ARG gitcommithash=HEAD
RUN git checkout "$gitcommithash" \
&& git reset --hard \
&& echo "pub const GIT_VERSION: Option <&str> = Some (\"$(git rev-parse HEAD)\");" > src/git_version.rs \
&& cargo test --release \
&& cargo build --release --bin ptth_relay
&& cargo test --release --all \
&& cargo build --release -p ptth_relay
FROM debian:buster-slim as deploy
@ -33,7 +33,7 @@ RUN apt-get update \
COPY --from=build /usr/src/target/release/ptth_relay /root
COPY --from=build /usr/src/src/git_version.rs /root/git_version.rs
COPY --from=build /usr/src/ptth_handlebars /root/ptth_handlebars
COPY --from=build /usr/src/handlebars /root/handlebars
WORKDIR /root