-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
83 lines (60 loc) · 2.77 KB
/
Dockerfile
File metadata and controls
83 lines (60 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Use the official ROS 2 Humble base image with Gazebo Fortress pre-installed
FROM osrf/ros:humble-desktop-full
# Set environment variables for non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive
# Update and install additional dependencies if needed
RUN apt-get update && apt-get install -y \
ros-humble-gazebo-ros-pkgs \
python3-vcstool \
python3-rosdep \
ignition-fortress \
vim \
nano \
openjdk-21-jdk \
ros-dev-tools \
python3-colcon-common-extensions \
wget \
unzip \
zip \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME="/usr/lib/jvm/java-21-openjdk-amd64"
ENV PATH="$JAVA_HOME/bin:$PATH"
RUN pip install -U git+https://github.com/colcon/colcon-gradle
RUN pip install --no-deps -U git+https://github.com/colcon/colcon-ros-gradle
RUN pip install masced_bandits
RUN curl -s https://raw.githubusercontent.com/kas-lab/ros_typedb/92f740630ff4ba2efaab00d5ede0640b659b5600/.github/workflows/install_typedb.sh | bash
RUN curl -s "https://get.sdkman.io" | bash \
&& bash -c "source /root/.sdkman/bin/sdkman-init.sh && sdk install gradle 8.5"
ENV SDKMAN_DIR="/root/.sdkman"
ENV PATH="$SDKMAN_DIR/bin:$SDKMAN_DIR/candidates/gradle/current/bin:$PATH"
ENV REBET_TERMINAL_PREFIX=""
# Create workspace directories
RUN mkdir -p /rebetmc_ws/src
# Copy dependencies.repos into the container
COPY rebetmirte.rosinstall /rebetmc_ws/
WORKDIR /rebetmc_ws
# Use vcs to import and clone all packages
RUN vcs import /rebetmc_ws/src < /rebetmc_ws/rebetmirte.rosinstall
RUN touch /rebetmc_ws/src/mirte-ros-packages/mirte_telemetrix_cpp/COLCON_IGNORE
RUN curl -skL https://raw.githubusercontent.com/EGAlberts/ros2_java/refs/heads/param_problem/ros2_java_desktop.repos | vcs import src
RUN git clone https://github.com/EGAlberts/ament_gradle_plugin.git --branch ivanpauno/gradle7.5-compatibility ./src/ament_gradle_plugin
RUN cd /rebetmc_ws/src/ament_gradle_plugin && gradle publishToMavenLocal
# Initialize rosdep
# RUN rosdep update && apt update
# Source ROS 2 setup script, install dependencies, and build the workspace
RUN touch /rebetmc_ws/src/ros2-java/ros2_java_examples/COLCON_IGNORE
# RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
# rosdep install --from-paths src --ignore-src -r -y"
RUN touch /rebetmc_ws/src/mirte-ros-packages/mirte_telemetrix_cpp/COLCON_IGNORE
RUN ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash \
&& apt update \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src -r -y \
&& sudo rm -rf /var/lib/apt/lists/"]
RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
colcon build --symlink-install"
RUN cd /rebetmc_ws/src/rebet_java && gradle copyDependencies
# RUN rm -rf /var/lib/apt/lists/*
# Set the default entrypoint
ENTRYPOINT ["/bin/bash"]