From 7645831a090433d5b114dbaf1d77f023cb790646 Mon Sep 17 00:00:00 2001 From: _ <> Date: Mon, 21 Dec 2020 16:46:02 +0000 Subject: [PATCH] :whale: build: fix Dockerfile by adding ptth_tail skeleton It's a bit silly, but because of the workspace setup, we can't build ptth_relay unless all the other projects have a skeleton. --- Dockerfile | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index c597284..d53f783 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,18 +17,20 @@ WORKDIR /ptth RUN \ cargo new --lib crates/always_equal && \ cargo new --lib crates/ptth_core && \ -cargo new --bin crates/ptth_file_server_bin && \ cargo new --bin crates/ptth_relay && \ -cargo new --bin crates/ptth_server +cargo new --bin crates/ptth_server && \ +cargo new --bin crates/ptth_file_server_bin && \ +cargo new --bin tools/ptth_tail # copy over your manifests -COPY ./Cargo.lock ./ -COPY ./Cargo.toml ./ -COPY ./crates/always_equal/Cargo.toml ./crates/always_equal/ -COPY ./crates/ptth_core/Cargo.toml ./crates/ptth_core/ -COPY ./crates/ptth_relay/Cargo.toml ./crates/ptth_relay/ -COPY ./crates/ptth_file_server_bin/Cargo.toml ./crates/ptth_file_server_bin/ -COPY ./crates/ptth_server/Cargo.toml ./crates/ptth_server/ +COPY ./Cargo.lock ./ +COPY ./Cargo.toml ./ +COPY ./crates/always_equal/Cargo.toml ./crates/always_equal/ +COPY ./crates/ptth_core/Cargo.toml ./crates/ptth_core/ +COPY ./crates/ptth_relay/Cargo.toml ./crates/ptth_relay/ +# COPY ./crates/ptth_server/Cargo.toml ./crates/ptth_server/ +# COPY ./crates/ptth_file_server_bin/Cargo.toml ./crates/ptth_file_server_bin/ +# COPY ./tools/ptth_tail/Cargo.toml ./tools/ptth_tail/ # this build step will cache your dependencies RUN cargo build --release -p ptth_relay @@ -38,16 +40,16 @@ rm \ src/*.rs \ crates/always_equal/src/*.rs \ crates/ptth_core/src/*.rs \ -crates/ptth_file_server_bin/src/*.rs \ -crates/ptth_relay/src/*.rs \ -crates/ptth_server/src/*.rs +crates/ptth_relay/src/*.rs # Copy source tree # Yes, I tried a few variations on the syntax. Dockerfiles are just rough. -COPY ./src/ ./src -COPY ./crates/ ./crates -COPY ./handlebars/ ./handlebars +COPY ./src/ ./src +COPY ./crates/always_equal ./crates/always_equal +COPY ./crates/ptth_core ./crates/ptth_core +COPY ./crates/ptth_relay ./crates/ptth_relay +COPY ./handlebars/ ./handlebars # Bug in cargo's incremental build logic, triggered by # Docker doing something funny with mtimes? Maybe?