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

Update Makefile and README after including docker-compose and ethernet container

parent 96b83ee2
No related branches found
No related tags found
1 merge request!1Include docker-compose and container for testing Ethernet traffic
registry=gitlab.cs.pub.ro:5050/reaact/can-container
registry=gitlab.cs.pub.ro:5050/reaact/automotive-comm-setup
img_name=can-container
tag_name=${registry}
eth_image="${registry}/eth"
can_image="${registry}/can"
# TODO: Update makefile
build:
docker image build -t ${tag_name} .
docker image build -f eth.Dockerfile -t ${eth_image} .
docker image build -f can.Dockerfile -t ${can_image} .
run:
docker run -d --network=host --name ${img_name} ${tag_name}
bash:
docker exec -it ${img_name} /bin/bash
docker-compose up
push:
docker push ${tag_name}
docker push ${eth_image}
docker push ${can_image}
clean:
docker rm -f ${img_name}
docker image rm -f ${tag_name}
docker-compose down --rmi local
......@@ -17,21 +17,21 @@ To be able to use/run it, the following steps should be followed:
* save the token to a file, as it is visible only once
3. Login
* docker login gitlab.cs.pub.ro:5050 -p "INSERT_ACCESS_TOKEN"
4. Pull the image
* docker pull gitlab.cs.pub.ro:5050/reaact/can-container
5. Run it
* docker run --name ubuntu-can --network=host gitlab.cs.pub.ro:5050/reaact/can-container:latest
6. Scan the traffic **on the host**
4. Run the setup using Docker Compose
* docker-compose up
5. Generate CAN or Ethernet traffic from the containers
docker exec <can-container-name> cangen vcan0
docker exec <eth-container-name> trafgen --dev <eth-if> --conf trafgen.cfg
6. View the CAN or Ethernet traffic **on the host**
* candump vcan0
* tcpdump -i <eth-if>
Or you can use the Makefile. Steps 1-3 remain the same and then:
* Get the changes
* git pull
* Run it
* Run the setup
* make run
* Generate traffic as mentioned in the previous section
* Scan the traffic **on the host**
* candump vcan0
* Delete the image and container
* Stop the containers and delete the images
* make clean
Useful links:
......
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