From 2a5d171484392d55f3abfd9e48807edc77c182b0 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Tue, 25 Jul 2023 15:51:34 +0200 Subject: Add arduino-cli docker file. --- .bin/arduino-cli | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .bin/arduino-cli (limited to '.bin/arduino-cli') diff --git a/.bin/arduino-cli b/.bin/arduino-cli new file mode 100755 index 0000000..7c0d41a --- /dev/null +++ b/.bin/arduino-cli @@ -0,0 +1,14 @@ +#!/bin/sh + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]] +then + docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli . +fi + +docker run --rm --network none -it --privileged \ + -v $(pwd):/src \ + -v jd-arduino-cli-tmp:/tmp \ + -v /dev:/dev jd-arduino-cli \ + arduino-cli $@ -- cgit v1.2.3