-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.arm64_env
54 lines (36 loc) · 1.47 KB
/
Dockerfile.arm64_env
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
FROM arm64v8/ros:noetic as requirement
# select bash as default shell
SHELL ["/bin/bash", "-c"]
# installing complementary tools
RUN apt-get update && \
apt-get install python3 -y \
python3-pip -y
# Environment setup
RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
RUN apt-get update && apt-get install python3-rosdep -y \
python3-rosinstall-generator -y \
python3-catkin-tools -y
RUN rosdep update
COPY rubyrhod_ws/src/REQUIREMENT.bash /REQUIREMENT.bash
RUN sed -i "s/apt-get install ros-noetic-rqt\*/DEBIAN_FRONTEND=noninteractive apt-get install ros-noetic-rqt\*/g" /REQUIREMENT.bash
RUN cat /REQUIREMENT.bash
RUN source /REQUIREMENT.bash
COPY rubyrhod_ws/src/kortex_api-2.5.0.post6-py3-none-any.whl /kortex_api-2.5.0.post6-py3-none-any.whl
RUN pip install kortex_api-2.5.0.post6-py3-none-any.whl
FROM requirement as dependencies
# importing rubyrhod_ws, will be used to get ros dependencies
COPY rubyrhod_ws rubyrhod_ws
WORKDIR /rubyrhod_ws
# Get packages dependencies and store in a file
RUN source /opt/ros/noetic/setup.bash && \
echo 'apt-get install -y' \
$( \
rosdep resolve $(rosdep keys --from-paths src --ignore-src | sort) | \
sed '/^#ROSDEP/d' | \
sed '/#apt/d' | \
sed ':a;N;$!ba;s/\n/ /g' \
) > /dependencies.bash
FROM requirement as env
# Importing dependency list from intermediate image
COPY --from=dependencies /dependencies.bash /dependencies.bash
RUN chmod +x dependencies.bash && ./dependencies.bash