🐳 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.
main
_ 2020-12-21 16:46:02 +00:00
parent 0a46fc05dc
commit 7645831a09
1 changed files with 17 additions and 15 deletions

View File

@ -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?