-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (60 loc) · 2.34 KB
/
Copy pathDockerfile
File metadata and controls
73 lines (60 loc) · 2.34 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
FROM ubuntu:22.04
LABEL author=raul@eprosima.com
# Avoid interactuation with installation of some package that needs the locale.
ENV TZ=Europe/Madrid
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Avoids using interactions during building
ENV DEBIAN_FRONTEND=noninteractive
# Use a bash shell so it is possigle to run things like `source` (required for colcon builds)
SHELL ["/bin/bash", "-c"]
# Install apt dependencies
RUN apt-get update && apt-get install --yes --no-install-recommends \
git \
build-essential \
cmake \
python3-pip \
wget \
software-properties-common \
zip \
python3 \
gradle \
openjdk-8-jdk \
libssl-dev \
libasio-dev \
libtinyxml2-dev \
openssl \
libyaml-cpp-dev
# Install required python modules
RUN pip3 install \
colcon-common-extensions \
colcon-mixin \
lxml \
vcstool \
GitPython
WORKDIR /ddsrouter
ARG fastcdr_branch=2.x
ARG fastdds_branch=3.x
ARG devutils_branch=main
ARG ddspipe_branch=main
ARG ddsrouter_branch=main
RUN echo "fastcdr branch: <${fastcdr_branch}>" && \
echo "fastdds branch: <${fastdds_branch}>" && \
echo "devutils branch: <${devutils_branch}>" && \
echo "ddspipe branch: <${ddspipe_branch}>" && \
echo "ddsrouter branch: <${ddsrouter_branch}>"
RUN mkdir src && \
wget https://raw.githubusercontent.com/eProsima/DDS-Router/${ddsrouter_branch}/ddsrouter.repos && \
vcs import src < ddsrouter.repos && \
cd src/fastcdr && git checkout ${fastcdr_branch} && cd ../.. && \
cd src/fastdds && git checkout ${fastdds_branch} && cd ../.. && \
cd src/dev-utils && git checkout ${devutils_branch} && cd ../.. && \
cd src/ddspipe && git checkout ${ddspipe_branch} && cd ../.. && \
cd src/ddsrouter && git checkout ${ddsrouter_branch} && cd ../.. && \
cp -r src/fastdds/examples/cpp/configuration src/. && \
: "TODO: Temporary workaround for GitHub Actions (Ubuntu 22.04) CMake compatibility. " \
: "Remove once CI CMake 3.28 compilation is fixed."; \
sed -i 's/cmake_minimum_required(VERSION 3.28)/cmake_minimum_required(VERSION 3.20)/' src/configuration/CMakeLists.txt && \
colcon build --event-handlers console_direct+ --cmake-args -DLOG_INFO=ON -DSECURITY=ON
COPY run.bash /root/run.bash
RUN chmod +x /root/run.bash
ENTRYPOINT ["/root/run.bash" ]