mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-05 19:47:04 +00:00
Fix build by docker compose
This commit is contained in:
parent
20c9919c0c
commit
52ff9fe5e7
2 changed files with 7 additions and 6 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -1,19 +1,19 @@
|
|||
ARG BASE_IMAGE
|
||||
ARG ROS_DISTRO
|
||||
FROM osrf/ros:${ROS_DISTRO}-desktop-full AS ros_distro
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
ARG ROS_DISTRO
|
||||
|
||||
# For this build, we pull the entire ros image, and then merge the filesystem
|
||||
# with the nvidia/opengl image, so that displaying to the screen on GPU
|
||||
# (or without GPU) works through docker.
|
||||
# I was unable to use the ROS_DISTRO variable here due to this issue:
|
||||
# https://github.com/docker/for-mac/issues/2155
|
||||
COPY --from=osrf/ros:melodic-desktop-full / /
|
||||
COPY --from=ros_distro / /
|
||||
|
||||
# Add ROS env vars to the bashrc
|
||||
ENV BASH_ENV="/root/launch.sh"
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENTRYPOINT ["/bin/bash", "-c"]
|
||||
ARG ROS_DISTRO
|
||||
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> $BASH_ENV
|
||||
|
||||
# Copy myCobot ROS package
|
||||
|
|
@ -21,8 +21,8 @@ WORKDIR /catkin_ws/src
|
|||
COPY . mycobot_ros
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
# ROS Build dependencies
|
||||
python-rosinstall \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
version: '3.4'
|
||||
|
||||
x-app: &common
|
||||
command: [ "roslaunch mycobot_320 mycobot_320_slider.launch" ]
|
||||
command: [ "roslaunch mycobot_280 slider_control.launch" ]
|
||||
privileged: true
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 1
|
||||
|
|
@ -9,6 +9,7 @@ x-app: &common
|
|||
DISPLAY: $DISPLAY
|
||||
volumes:
|
||||
- "/tmp/.X11-unix:/tmp/.X11-unix:rw"
|
||||
- ".:/catkin_ws/src/mycobot_ros"
|
||||
build:
|
||||
context: .
|
||||
args: &common-args
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue