feat(docker): runtime image for the tines service
This commit is contained in:
@@ -3,3 +3,4 @@
|
|||||||
.superpowers
|
.superpowers
|
||||||
docs
|
docs
|
||||||
HANDOFF.md
|
HANDOFF.md
|
||||||
|
tines-gui
|
||||||
|
|||||||
@@ -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"]
|
||||||
Reference in New Issue
Block a user