From 8fd48c5e5fa60043d443ecf038df4e28167bec13 Mon Sep 17 00:00:00 2001 From: Spencer Heywood Date: Fri, 16 Jan 2026 17:32:23 -0700 Subject: [PATCH] init dockerfile --- Dockerfile | 11 +++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f35dd82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM docker.io/python:3.14 + +COPY . /app +WORKDIR /data + +# Install contact +RUN python -m pip install /app && rm -rf /app + +VOLUME /data + +ENTRYPOINT [ "contact" ] diff --git a/README.md b/README.md index a0c3631..9df3f03 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,20 @@ The settings dialogue can be accessed within the client or may be run standalone Screenshot 2025-04-08 at 6 10 06 PM +### Docker install + +Install with Docker: + +``` +docker build -t contact . + +# Change /tmp/data to a directory you'd like to persist the database in +export DATA_DIR="/tmp/contact" + +mkdir -p "$DATA_DIR" +docker run -it --rm -v $DATA_DIR:/data --workdir /data --device=/dev/ttyUSB0 contact --port /dev/ttyUSB0 +``` + ## Message Persistence All messages will saved in a SQLite DB and restored upon relaunch of the app. You may delete `client.db` if you wish to erase all stored messages and node data. If multiple nodes are used, each will independently store data in the database, but the data will not be shared or viewable between nodes.