Skip to content

Simple demo that connects two applications running in different containers on different hosts via a virtual CAN.

License

Notifications You must be signed in to change notification settings

milesstoetzner/docker-virtual-can

Repository files navigation

Docker Virtual CAN

Simple demo that connects two applications running in different containers on different hosts via a virtual CAN. In a nutshell, each container initializes a virtual CAN und starts a can2udp process. In our demo we start the containers on the same docker engine and use candump as dummy application inside the container.

Docker Virtual CAN Demo

We assume that

  • ports 6001 and 6002 are available
  • that docker engine is running under 172.17.0.1

Note, since we initialize the CAN inside the container the NET_ADMIN capability is required.

To start the services and to attach to the logs run the following command.

docker-compose up

You can send a message on one of the local CANs as follows.

docker-compose exec one cansend vcan0 01a#11223344AABBCCDD

Note, this example does NOT WORK on Windows using WSL backend since there is no support for SocketCAN, see microsoft/WSL#5533.

About

Simple demo that connects two applications running in different containers on different hosts via a virtual CAN.

Topics

Resources

License

Stars

Watchers

Forks