Skip to content

Commit

Permalink
add docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonR99 committed Dec 6, 2023
1 parent 0dad642 commit f8761dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ RUN cd ~/workspace/src/ros_gz/ && git checkout $ROS_DISTRO
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash; cd ~/workspace; colcon build --cmake-args -DBUILD_TESTING=OFF --symlink-install --merge-install'


# COPY rove_description for pre-installation
COPY . /root/workspace/src/rove_description

# Build the rove_description ROS packages
RUN /bin/bash -c '. /opt/ros/${ROS_DISTRO}/setup.bash; cd ~/workspace; colcon build --symlink-install --packages-select rove_description --merge-install'

# Create symbolic links for the world files
RUN ln -sf /root/workspace/src/rove_description/worlds/base_world.world /root/workspace/install/share/rove_description/worlds/base_world.world

# Create entrypoint
RUN echo '#!/bin/bash \n\
source /opt/ros/${ROS_DISTRO}/setup.bash \n\
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
services:
gazebo:
build:
context: .
dockerfile: Dockerfile
environment:
- DISPLAY
- QT_X11_NO_MITSHM
- XAUTHORITY
- ROS_DOMAIN_ID=0
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /tmp/.Xauthority:/tmp/.Xauthority:rw
command: ign gazebo --headless-rendering
network_mode: "host"
privileged: true

0 comments on commit f8761dc

Please sign in to comment.