Skip to content

Commit 93537bd

Browse files
committed
run mqtt_client and mosquitto in docker containers
1 parent d483bf8 commit 93537bd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ If you would like to install *mqtt_client* from source, simply clone this reposi
3636
rosdep install -r --ignore-src --from-paths .
3737
```
3838

39+
Alternatively, you can directly run the *mqtt_client* and the *mosquitto* MQTT broker in two Docker containers.
40+
41+
```bash
42+
# mqtt_client/docker$
43+
docker compose up broker run
44+
```
45+
3946
## Usage
4047

4148
The *mqtt_client* can be easily integrated into an existing ROS-based system. Below, you first find a quick start guide to test the *mqtt_client* on a single machine. Then, more details are presented on how to launch and configure it in more complex applications.

docker/docker-compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ x-build: &build
1717
services:
1818
dev:
1919
image: *dev-image
20+
network_mode: "host"
2021
build:
2122
target: dev
2223
<<: *build
2324
run:
2425
image: *run-image
26+
network_mode: "host"
2527
build:
2628
target: run
2729
<<: *build
30+
broker:
31+
network_mode: "host"
32+
image: eclipse-mosquitto

0 commit comments

Comments
 (0)