mirror of
https://github.com/EECS-467-W20-RRRobot-Project/RRRobot.git
synced 2025-09-03 04:13:14 +00:00
Docker-Compose Comments and Variable
- Add comments to docker-compose.yml - Add ros-turtlesim service - Use IP_ADDRESS environment variable in docker-compose.yml - Add .env to specify IP_ADDRESS environment variable
This commit is contained in:
@@ -5,16 +5,46 @@ version: '3'
|
|||||||
|
|
||||||
# Define services
|
# Define services
|
||||||
services:
|
services:
|
||||||
|
# ROS Service
|
||||||
ros:
|
ros:
|
||||||
|
# Use Dockerfile in ros folder
|
||||||
build: ./ros
|
build: ./ros
|
||||||
|
# Mount ros folder on host to app folder in container
|
||||||
volumes:
|
volumes:
|
||||||
- ./ros:/app
|
- ./ros:/app
|
||||||
|
# Set DISPLAY variable and network mode for GUIs
|
||||||
|
environment:
|
||||||
|
- DISPLAY=${IP_ADDRESS}:0.0
|
||||||
|
network_mode: "host"
|
||||||
|
# Set working directory in container to app folder
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
|
||||||
|
# ROS Turtlesim Service
|
||||||
|
ros-turtlesim:
|
||||||
|
# Use Dockerfile in ros-turtlesim folder
|
||||||
|
build: ./ros-turtlesim
|
||||||
|
# Mount ros-turtlesim folder on host to app folder in container
|
||||||
|
volumes:
|
||||||
|
- ./ros-turtlesim:/app
|
||||||
|
# Set DISPLAY variable and network mode for GUIs
|
||||||
|
environment:
|
||||||
|
- DISPLAY=${IP_ADDRESS}:0.0
|
||||||
|
network_mode: "host"
|
||||||
|
# Set working directory in container to app folder
|
||||||
|
working_dir: /app
|
||||||
|
# Run turtlesim script when container is run
|
||||||
|
command: bash -c "./turtlesim.sh"
|
||||||
|
|
||||||
|
# Gazebo Service
|
||||||
gazebo:
|
gazebo:
|
||||||
|
# Use Dockerfile in gazebo folder
|
||||||
build: ./gazebo
|
build: ./gazebo
|
||||||
|
# Mount gazebo folder on host to app folder in container
|
||||||
volumes:
|
volumes:
|
||||||
- ./gazebo:/app
|
- ./gazebo:/app
|
||||||
|
# Set DISPLAY variable and network mode for GUIs
|
||||||
|
environment:
|
||||||
|
- DISPLAY=${IP_ADDRESS}:0.0
|
||||||
|
network_mode: "host"
|
||||||
|
# Set working directory in container to app folder
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
Reference in New Issue
Block a user