-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathDockerfile-RHEL
238 lines (221 loc) · 8.25 KB
/
Dockerfile-RHEL
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
FROM almalinux:8
ARG ROS_DISTRO=rolling
ARG EL_RELEASE=8
# Pin $releasever
RUN sed -i "s/\$releasever/${EL_RELEASE}/g" /etc/yum.repos.d/*.repo
# Add some repos
RUN dnf install epel-release 'dnf-command(config-manager)' --refresh -y && \
dnf config-manager --set-enabled $(if test ${EL_RELEASE/.*/} = 8; then echo powertools; else echo crb; fi) && \
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
# Install foundation packages
RUN dnf install \
cmake \
gcc-c++ \
git \
glibc-langpack-en \
make \
matchbox-window-manager \
mesa-dri-drivers \
net-tools \
patch \
python3-colcon-bash \
python3-colcon-cmake \
python3-colcon-core \
python3-colcon-defaults \
python3-colcon-library-path \
python3-colcon-metadata \
python3-colcon-mixin \
python3-colcon-output \
python3-colcon-package-information \
python3-colcon-package-selection \
python3-colcon-parallel-executor \
python3-colcon-pkg-config \
python3-colcon-powershell \
python3-colcon-python-setup-py \
python3-colcon-recursive-crawl \
python3-colcon-ros \
python3-colcon-test-result \
python3-colcon-zsh \
python3-devel \
python3-jsonschema \
python3-pip \
python3-rosdep \
python3-vcstool \
python3-virtualenv \
sudo \
vim \
wget \
xorg-x11-server-Xvfb \
--refresh -y
# Try to update to any ROS packages currently in testing
RUN dnf update \
python3-bloom* \
python3-catkin* \
python3-colcon* \
python3-ros* \
python3-vcstool \
--enablerepo=epel-testing --skip-broken --refresh -y
# Initialize rosdep
RUN rosdep init && rosdep update
# These dependencies were generated by invoking rosdep on the latest version of the target workspace:
# rosdep install --from-paths src --ignore-src --simulate --reinstall --skip-keys ...
RUN dnf install \
CUnit-devel \
acl \
$(if test ${EL_RELEASE/.*/} != 8; then echo asio-devel; fi) \
assimp-devel \
bison \
boost-devel \
bullet-devel \
clang \
clang-tools-extra \
cmake3 \
console-bridge-devel \
cppcheck \
cppunit-devel \
$(if test ${EL_RELEASE/.*/} = 8; then echo curl; else echo curl-minimal; fi) \
doxygen \
eigen3-devel \
file \
freetype \
freetype-devel \
git \
gmock-devel \
google-benchmark-devel \
graphviz \
gtest-devel \
libX11-devel \
libXaw-devel \
libXext-devel \
libXrandr-devel \
libacl-devel \
libatomic \
libcurl-devel \
libsq3-devel \
libxml2 \
libyaml-devel \
libzstd-devel \
$(if test ${EL_RELEASE/.*/} != 8; then echo lttng-tools; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo lttng-tools-devel; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo lttng-ust-devel; fi) \
lz4-devel \
mesa-libGL-devel \
mesa-libGLU-devel \
opencv-devel \
openssl \
openssl-devel \
orocos-kdl-devel \
pkgconfig \
$(if test ${EL_RELEASE/.*/} != 8; then echo pybind11-devel; fi) \
python3-PyYAML \
python3-argcomplete \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-babeltrace; fi) \
python3-cairo \
python3-catkin_pkg \
python3-cryptography \
python3-devel \
python3-empy \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-fastjsonschema; fi) \
python3-flake8 \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-blind-except; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-builtins; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-class-newline; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-comprehensions; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-deprecated; fi) \
python3-flake8-docstrings \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-import-order; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-flake8-quotes; fi) \
python3-importlib-metadata \
$(if test ${EL_RELEASE/.*/} = 8; then echo python3-importlib-resources; fi) \
python3-lark-parser \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-lttng; fi) \
python3-lxml \
python3-matplotlib \
$(if test ${EL_RELEASE/.*/} = 8; then echo python3-mock; fi) \
$(if test ${EL_RELEASE/.*/} != 8; then echo python3-mypy; fi) \
$(if test ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron; then echo python3-netifaces; fi) \
$(if test ${EL_RELEASE/.*/} = 8; then echo python3-nose; fi) \
python3-numpy \
python3-osrf-pycommon \
python3-packaging \
python3-pillow \
python3-psutil \
python3-pycodestyle \
python3-pydocstyle \
python3-pydot \
python3-pyflakes \
python3-pygraphviz \
python3-pykdl \
python3-pytest \
python3-pytest-cov \
python3-pytest-mock \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-pytest-runner \
python3-pytest-timeout \
python3-qt5-devel \
python3-rosdistro \
python3-setuptools \
python3-sip-devel \
qt5-qtbase \
qt5-qtbase-devel \
qt5-qtbase-gui \
redhat-rpm-config \
spdlog-devel \
sqlite-devel \
tango-icon-theme \
$(if test \( ${ROS_DISTRO} = humble -o ${ROS_DISTRO} = iron \); then echo tinyxml-devel; fi) \
tinyxml2-devel \
uncrustify \
yaml-cpp-devel \
yamllint \
--refresh -y
# Install dependencies of Connext and its installer
RUN dnf install \
libnsl2-devel \
python3-pexpect \
--refresh -y
# Get and install the RTI web binaries.
# Connext 6.0.1 for humble and beyond, the evaluation bundles don't contain security extensions so we need to distribute the pro binaries to ourselves.
COPY rticonnextdds-src/ /tmp/rticonnextdds-src
RUN for splitpkg in \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1-pro-host-x64Linux.run \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1.25-pro-host-x64Linux.rtipkg \
/tmp/rticonnextdds-src/rti_connext_dds-6.0.1.25-pro-target-x64Linux4gcc7.3.0.rtipkg; \
do \
cat $(echo ${splitpkg}.0?? | sort) > $splitpkg; \
done; \
chmod 755 /tmp/rticonnextdds-src/rti_connext_dds-6.0.1-pro-host-x64Linux.run;
ADD rti_web_binaries_install_script.py /tmp/rti_web_binaries_install_script.py
# Add the RTI license file.
ADD rticonnextdds-license/rti_license.dat /tmp/rti_license.dat
# Install newer versions of some pip packages for RHEL-8
RUN if test ${EL_RELEASE/.*/} = 8; then \
echo -e "EmPy<4\ncryptography<=3.0\nflake8<5.0.0\nflake8-blind-except==0.1.1\nlark==1.1.1\nmypy==0.942\npycodestyle==2.5.0\npyparsing==2.4.7\npytest==6.2.5\npytest-timeout==2.1.0\nsetuptools==59.6.0" > constraints.txt && \
python3 -m pip install -c constraints.txt -U colcon-ros-domain-id-coordinator flake8-blind-except==0.1.1 flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-import-order flake8-quotes mypy pycodestyle pytest pytest-rerunfailures==10.2 && \
rm -f constraints.txt ; \
fi
# automatic invalidation once every day.
RUN echo "@today_str"
RUN dnf update --refresh -y
ENV CMAKE_PREFIX_PATH=/usr
ENV DISPLAY=:99
ENV LANG=en_US.UTF-8
# Create a user to own the build output.
RUN useradd -u 1234 -m rosbuild
RUN sudo -H -u rosbuild -- git config --global user.email "[email protected]"
RUN sudo -H -u rosbuild -- git config --global user.name "Jenkins ROS 2"
RUN echo 'rosbuild ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# RHEL 8 doesn't have Asio yet, but Fast-DDS can bundle it
ADD fastrtps-bundle-asio.meta /home/rosbuild/.colcon/metadata-disabled/fastrtps.meta
# The version of Eigen in RHEL-8 (3.3.4) has a bug in it that causes
# many warnings from "-Wint-in-bool-context". Suppress it here.
ADD tf2_eigen-disable-compiler-warning.meta /home/rosbuild/.colcon/metadata-disabled/tf2_eigen.meta
RUN if test ${EL_RELEASE/.*/} = 8; then mkdir -p /home/rosbuild/.colcon/metadata && mv /home/rosbuild/.colcon/metadata-disabled/{fastrtps,tf2_eigen}.meta /home/rosbuild/.colcon/metadata/; fi
RUN chown rosbuild: /home/rosbuild/.colcon -R
# Add an entry point which changes rosbuild's UID from 1234 to the UID of the invoking user.
# This means that the generated files will have the same ownership as the host OS user.
COPY entry_point.sh /entry_point.sh
RUN chmod 755 /entry_point.sh
ENTRYPOINT ["/entry_point.sh"]
CMD ["matchbox-window-manager > /dev/null 2>&1 & python3 -u run_ros2_batch.py $CI_ARGS"]