-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 1.26 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
FROM osrf/ros:jazzy-desktop
# Set timezone
RUN echo "America/New_York" > /etc/timezone
# Copy requirements files
COPY apt-requirements.txt /tmp/apt-requirements.txt
COPY pip-requirements.txt /tmp/pip-requirements.txt
# Install apt packages
RUN apt-get update && \
apt-get install --no-install-recommends $(grep -vE "^\s*#" /tmp/apt-requirements.txt | tr "\n" " ") -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists && \
rm /tmp/apt-requirements.txt
# Install pip packages
# Note: --break-system-packages needed for Python 3.12+ (ROS Jazzy)
RUN pip3 install --break-system-packages -r /tmp/pip-requirements.txt && \
rm /tmp/pip-requirements.txt
# Copy workspace (excluding data folder - will be mounted)
COPY rwa2_starter/ /workspace/rwa2_starter/
COPY LICENSE /workspace/
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Setup bashrc (workspace will be built after mounting)
RUN echo "source /opt/ros/jazzy/setup.bash" >> /root/.bashrc && \
echo "if [ -f /workspace/install/setup.bash ]; then source /workspace/install/setup.bash; fi" >> /root/.bashrc && \
echo "cd /workspace" >> /root/.bashrc
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["bash"]