Skip to content
Snippets Groups Projects
Commit 036aeb05 authored by Claudiu MILEA (95030)'s avatar Claudiu MILEA (95030)
Browse files

Update setup to include ethernet container; Add docker-compose with local...

Update setup to include ethernet container; Add docker-compose with local docker images for the moment
parent 2226078b
No related branches found
No related tags found
1 merge request!1Include docker-compose and container for testing Ethernet traffic
# The host exposes the virtual interface vcan0:
# https://stackoverflow.com/questions/21022749/how-to-create-virtual-can-port-on-linux-c
# sudo modprobe vcan
# sudo ip link add dev vcan0 type vcan
# sudo ip link set up vcan0
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install can-utils
# For the moment, expose the host network to the container for vcan0 visibility
# https://www.lagerdata.com/articles/forwarding-can-bus-traffic-to-a-docker-container-using-vxcan-on-raspberry-pi
CMD cangen vcan0
# On the host system, run 'candump vlan0' command to capture generated CAN traffic
......@@ -2,6 +2,7 @@ registry=gitlab.cs.pub.ro:5050/reaact/can-container
img_name=can-container
tag_name=${registry}
# TODO: Update makefile
build:
docker image build -t ${tag_name} .
......
# The host exposes the virtual interface vcan0:
# https://stackoverflow.com/questions/21022749/how-to-create-virtual-can-port-on-linux-c
# sudo modprobe vcan
# sudo ip link add dev vcan0 type vcan
# sudo ip link set up vcan0
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install can-utils
# Keep the container running
CMD tail -f /dev/null
version: "3.3"
services:
eth:
build:
context: .
dockerfile: ./eth.Dockerfile
network_mode: "host"
privileged: true
can:
build:
context: .
dockerfile: ./can.Dockerfile
network_mode: "host"
privileged: true
FROM ubuntu:20.04
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Bucharest apt-get -y install tzdata
RUN apt-get -y install iproute2
RUN apt-get -y install netsniff-ng
# Dummy trafgen config
RUN echo "{ fill(0xff, 64) csum16(0, 64) }" > trafgen.cfg
# Keep the container running
CMD tail -f /dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment