From 01f5f1b5ba7349622fd9bb4647dbc705e54f58fe Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sat, 22 Jan 2022 00:01:32 -0800 Subject: [PATCH] initial dockerfile and notes --- Dockerfile | 16 ++++++++++++++++ docker.txt | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Dockerfile create mode 100644 docker.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..2f9c3a60 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu +MAINTAINER Kevin Hester + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install wget python3 g++ zip python3-venv git vim +RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O get-platformio.py; chmod +x get-platformio.py +RUN python3 get-platformio.py +RUN git clone https://github.com/meshtastic/Meshtastic-device.git +RUN cd Meshtastic-device; git submodule update --init --recursive +# only build the simulator +RUN sed -i 's/^BOARDS_ESP32.*/BOARDS_ESP32=""/' Meshtastic-device/bin/build-all.sh +RUN sed -i 's/^BOARDS_NRF52.*/BOARDS_NRF52=""/' Meshtastic-device/bin/build-all.sh +RUN sed -i 's/echo "Building SPIFFS.*/exit/' Meshtastic-device/bin/build-all.sh +RUN . ~/.platformio/penv/bin/activate; cd Meshtastic-device; ./bin/build-all.sh + +CMD ["/Meshtastic-device/release/latest/bins/universal/meshtasticd_linux_amd64"] diff --git a/docker.txt b/docker.txt new file mode 100644 index 00000000..af2c9c0b --- /dev/null +++ b/docker.txt @@ -0,0 +1,17 @@ +To build: + docker build -t meshtastic/device . + +To run: + docker run --rm -p 4403:4403 meshtastic/device +or, to get a shell on the docker image: + docker run -it meshtastic/device bash + +To use python cli against it: + meshtastic --info --host localhost + +To stop: + # run this to get id + docker ps + # tip: you can just use the first few characters of the id in the next command + docker kill +