From 96b5811397a4e261b3084aff909951fb1b8d9dcb Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 16 Apr 2019 18:02:01 +0200 Subject: [PATCH] Add entrypoint --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24c09ec..b833397 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,12 @@ FROM ekidd/rust-musl-builder:stable as builder # create new cargo project RUN USER=rust cargo init --bin -# set last modified date to 1970-01-01 to prevent caching issues later on -# RUN touch -t 197001010000.00 src/main.rs # copy build config COPY ./Cargo.lock ./Cargo.lock COPY ./Cargo.toml ./Cargo.toml # build to cache dependencies RUN cargo build --release -# RUN ls target/x*/release -# RUN touch -t 197001010000.00 ./target/x86_64-unknown-linux-musl/release/hoc.d +# delete build cache to prevent caching issues later on RUN rm -r ./target/x86_64-unknown-linux-musl/release/.fingerprint/hoc-* # copy source code @@ -22,3 +19,5 @@ FROM alpine:latest RUN apk --no-cache add --update git COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/hoc /hoc + +ENTRYPOINT ["/hoc"]