Testing standalone docker compose
Create and publish a Docker image / build-and-push-image (push) Successful in 7m7s Details

This commit is contained in:
emranB 2024-06-24 13:56:31 -03:00
parent 2edf1eeda8
commit 37f50395db
2 changed files with 72 additions and 0 deletions

View File

@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y \
vim \
build-essential \
ros-kinetic-mavros \
dos2unix \
ros-kinetic-mavros-extras \
ros-kinetic-mavros-msgs \
ros-kinetic-catkin
@ -20,5 +21,6 @@ ENV CATKIN_SETUP_FILE devel/setup.bash
RUN apt-get clean
COPY ./ros_entrypoint.sh /ros_entrypoint.sh
RUN /bin/bash -c "dos2unix /ros_entrypoint.sh"
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD /ros_entrypoint.sh rostopic list

View File

@ -0,0 +1,70 @@
version: "3.8"
services:
# mavros:
# #This service bridges our mavlink-based robot-coprosessor into ROS
# #In this example it connects to a simulated coprocessor.
# image: git.spirirobotics.com/spiri/services-ros1-mavros:master
# command: roslaunch mavros px4.launch fcu_url:="udp://:14557@gazebo:14540"
# environment:
# - "ROS_MASTER_URI=http://ros-master:11311"
# depends_on:
# ros-master:
# condition: service_healthy
# # mavproxy:
# # condition: service_started
# restart: always
# deploy:
# resources:
# limits:
# # cpus: '0.01'
# memory: 200M
# ulimits:
# nofile:
# soft: 1024
# hard: 524288
# networks:
# - sim_network
ros-master:
image: git.spirirobotics.com/spiri/services-ros1-core:main
command: stdbuf -o L roscore
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
restart: always
ports:
- "11311:11311"
deploy:
resources:
limits:
memory: 1G
# Madness, setting a low ulimit here fixes memory leaks
# https://answers.ros.org/question/336963/rosout-high-memory-usage/
ulimits:
nofile:
soft: 1024
hard: 524288
networks:
- sim_network
xbee-mav:
command: tail -f /dev/null
container_name: xbee-mav
depends_on:
- ros-master
build:
context: .
dockerfile: Dockerfile
devices:
- 'COM16'
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
networks:
- sim_network
networks:
sim_network:
driver: bridge