-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker file and docker compose to dockerize rolling
- Loading branch information
Shivang Vijay
committed
Mar 8, 2024
1 parent
ae14222
commit 07192f5
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM osrf/ros:rolling-desktop | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
RUN apt update | ||
COPY . /app/src/rmw_zenoh | ||
WORKDIR /app | ||
RUN rosdep install --from-paths src --ignore-src --rosdistro rolling -y | ||
RUN source /opt/ros/rolling/setup.bash && source "$HOME/.cargo/env" && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
ENTRYPOINT ["/app/src/rmw_zenoh/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version: '3.2' | ||
services: | ||
router: | ||
build: | ||
context: . | ||
image: zenoh:latest | ||
stdin_open: true | ||
tty: true | ||
container_name: router_container | ||
command: router | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
network_mode: host | ||
|
||
|
||
talker: | ||
build: | ||
context: . | ||
image: zenoh:latest | ||
stdin_open: true | ||
tty: true | ||
container_name: talker_container | ||
command: talker | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
network_mode: host | ||
depends_on: | ||
- router | ||
|
||
listener: | ||
build: | ||
context: . | ||
image: zenoh:latest | ||
stdin_open: true | ||
tty: true | ||
container_name: listener_container | ||
command: listener | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
network_mode: host | ||
depends_on: | ||
- router | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
source ./install/setup.bash | ||
|
||
if [ $1 = "router" ] | ||
then | ||
ros2 run rmw_zenoh_cpp rmw_zenohd | ||
fi | ||
|
||
if [ $1 = "talker" ] | ||
then | ||
export RMW_IMPLEMENTATION=rmw_zenoh_cpp | ||
ros2 run demo_nodes_cpp talker | ||
fi | ||
|
||
if [ $1 = "listener" ] | ||
then | ||
export RMW_IMPLEMENTATION=rmw_zenoh_cpp | ||
ros2 run demo_nodes_cpp listener | ||
fi | ||
|