mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
chore: drop ptp-probe/statime and run haci in Docker
Co-authored-by: aider (openai/gpt-5) <aider@aider.chat>
This commit is contained in:
parent
62c94c777f
commit
e5a2c52120
2 changed files with 7 additions and 45 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -18,13 +18,11 @@ RUN mkdir -p src && echo 'fn main() { println!("cargo:rerun-if-changed=build.rs"
|
|||
RUN cargo build --release || true
|
||||
RUN rm -rf src
|
||||
|
||||
# Copy full source and build real binaries
|
||||
# Copy full source and build project
|
||||
COPY . .
|
||||
RUN cargo build --release --bin ntp_timeturner --bin ptp_probe
|
||||
RUN cargo build --release
|
||||
|
||||
# Build and install the Statime PTP daemon (from crates.io)
|
||||
# This installs the 'statime' binary into /usr/local/cargo/bin/statime in the builder image.
|
||||
RUN cargo install --locked statime-linux --version 0.4.0
|
||||
# (Statime installation removed; container runs only haci)
|
||||
|
||||
# Runtime image
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
|
@ -37,13 +35,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/target/release/ntp_timeturner /usr/local/bin/ntp_timeturner
|
||||
COPY --from=builder /app/target/release/ptp_probe /usr/local/bin/ptp_probe
|
||||
COPY --from=builder /usr/local/cargo/bin/statime /usr/local/bin/statime
|
||||
COPY --from=builder /app/target/release/get-haci /usr/local/bin/get-haci
|
||||
COPY static ./static
|
||||
|
||||
ENV RUST_LOG=info
|
||||
EXPOSE 8080
|
||||
|
||||
# Default to running the main server
|
||||
CMD ["ntp_timeturner"]
|
||||
CMD ["get-haci"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue