add inspect/serial-log container

This commit is contained in:
Sebastian Kuzminsky 2025-09-04 16:07:55 -06:00
parent aca207246d
commit 41fc678b69
4 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,19 @@
FROM debian:stable-slim
# set up base package requirements for can device
RUN ( \
set -e; \
apt-get --yes --quiet update; \
apt-get install --yes --quiet \
tio \
; \
apt-get --yes --quiet clean; \
)
# set workdir to /usr/src/env
WORKDIR /usr/src/env
# copy init.sh to workdir
COPY init.sh ./
ENTRYPOINT ["/bin/bash", "init.sh"]

2
inspect/serial-log/build.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
docker build --platform arm64 --tag inspect/serial-log .

6
inspect/serial-log/init.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -x
SERIAL_DEV=$1
DEV_NAME=$(basename "${SERIAL_DEV}")
tio -m INLCRNL --log --log-file "serial-log.${DEV_NAME}" "${SERIAL_DEV}"

6
inspect/serial-log/run.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -x
SERIAL_DEV="$1"
DEV="--device $1:$1"
docker run --rm -it --network=host --privileged ${DEV} -v $PWD:/usr/src/env/ext-dir inspect/serial-log $1