add inspect/serial-log container
This commit is contained in:
parent
aca207246d
commit
41fc678b69
4 changed files with 33 additions and 0 deletions
19
inspect/serial-log/Dockerfile
Normal file
19
inspect/serial-log/Dockerfile
Normal 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
2
inspect/serial-log/build.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker build --platform arm64 --tag inspect/serial-log .
|
||||||
6
inspect/serial-log/init.sh
Executable file
6
inspect/serial-log/init.sh
Executable 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
6
inspect/serial-log/run.sh
Executable 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue