add docker container for CAN inspection
This commit is contained in:
parent
90835f8a63
commit
806dcc7e15
4 changed files with 23 additions and 0 deletions
16
inspect/can/Dockerfile
Normal file
16
inspect/can/Dockerfile
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM debian:stable-slim
|
||||||
|
RUN apt-get update && apt-get upgrade --yes
|
||||||
|
|
||||||
|
# set workdir to /usr/src/env
|
||||||
|
WORKDIR /usr/src/env
|
||||||
|
|
||||||
|
# set up base package requirements for can device
|
||||||
|
RUN apt-get install --yes can-utils iproute2
|
||||||
|
|
||||||
|
# set up python, create venv, and install cantools
|
||||||
|
RUN apt-get install --yes python3 python3-venv && python3 -m venv ./venv && . venv/bin/activate && pip install cantools
|
||||||
|
|
||||||
|
# copy init.sh to workdir
|
||||||
|
COPY init.sh ./
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash", "init.sh"]
|
||||||
2
inspect/can/build.sh
Executable file
2
inspect/can/build.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker build --tag inspect/can .
|
||||||
3
inspect/can/init.sh
Executable file
3
inspect/can/init.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source venv/bin/activate
|
||||||
|
exec bash
|
||||||
2
inspect/can/run.sh
Executable file
2
inspect/can/run.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
docker run --rm -it --network=host --privileged -v ./:/usr/src/env/ext-dir inspect/can
|
||||||
Loading…
Add table
Add a link
Reference in a new issue