From 7b30550454fead2684e1217ab67151eb36fd913c Mon Sep 17 00:00:00 2001 From: "K. Isom" Date: Sat, 24 Oct 2026 23:16:07 -0700 Subject: [PATCH] feat(docker): runtime image for the tines service --- .dockerignore | 1 + Dockerfile.tines | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Dockerfile.tines diff --git a/.dockerignore b/.dockerignore index 9e9960e3..c73abc83 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,4 @@ .superpowers docs HANDOFF.md +tines-gui diff --git a/Dockerfile.tines b/Dockerfile.tines new file mode 100644 index 00000000..7ac07bd9 --- /dev/null +++ b/Dockerfile.tines @@ -0,0 +1,47 @@ +# Runtime image for the tines service. Two stages: a build stage that +# compiles the workspace crates, and a slim runtime with the release +# binaries. The same image serves both fleet-console modes — BT mode adds +# --privileged / host networking / D-Bus plumbing at `docker run` time +# (Task 7), and bus mode just points the config at a host bus socket. + +# ---- build --------------------------------------------------------------- +FROM ubuntu:24.04 AS build + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential pkg-config cmake curl ca-certificates \ + libclang-dev clang libdbus-1-dev libudev-dev \ + && rm -rf /var/lib/apt/lists/* + +# Minimal rustup: default host, no extra targets or toolchains. +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ + | sh -s -- -y --profile minimal +ENV PATH="/root/.cargo/bin:${PATH}" + +WORKDIR /workspace + +# The workspace manifest and every member crate dir (all members' manifests +# must be present for cargo to resolve the workspace). +COPY Cargo.toml Cargo.lock ./ +COPY tines-core ./tines-core +COPY tines-store ./tines-store +COPY tines-bt ./tines-bt +COPY tines-bus ./tines-bus +COPY tines-sim ./tines-sim +COPY tines-ros2 ./tines-ros2 +COPY tines ./tines + +RUN cargo build --release -p tines -p tines-bus + +# ---- runtime -------------------------------------------------------------- +FROM ubuntu:24.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + libdbus-1-3 libudev1 bluez dbus \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=build /workspace/target/release/tines /usr/local/bin/ +COPY --from=build /workspace/target/release/tines-busd /usr/local/bin/ + +# The config path comes as the container arg (BT or bus mode, whichever the +# config selects); no default CMD. +ENTRYPOINT ["tines"]