| 1 |
# Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima). |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
FROM gcc:latest |
| 16 |
|
| 17 |
# Needed for a dependency that forces to set timezone |
| 18 |
ENV TZ=Europe/Madrid |
| 19 |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
| 20 |
|
| 21 |
# Avoids using interactions during building |
| 22 |
ENV DEBIAN_FRONTEND=noninteractive |
| 23 |
|
| 24 |
# Use a bash shell so it is possigle to run things like `source` (required for colcon builds) |
| 25 |
SHELL ["/bin/bash", "-c"] |
| 26 |
|
| 27 |
# Install apt dependencies |
| 28 |
RUN apt-get update && apt-get install --yes --no-install-recommends \ |
| 29 |
# Common build dependencies |
| 30 |
build-essential \ |
| 31 |
cmake \ |
| 32 |
git \ |
| 33 |
python3-pip \ |
| 34 |
wget |
| 35 |
|
| 36 |
# Install required python modules |
| 37 |
RUN rm /usr/lib/python*/EXTERNALLY-MANAGED && \ |
| 38 |
pip3 install \ |
| 39 |
colcon-common-extensions \ |
| 40 |
vcstool |
| 41 |
|
| 42 |
# Install apt dependencies |
| 43 |
RUN apt-get update && apt-get install --yes --no-install-recommends \ |
| 44 |
# Fast DDS dependencies |
| 45 |
libssl-dev \ |
| 46 |
libasio-dev \ |
| 47 |
libtinyxml2-dev \ |
| 48 |
openssl |
| 49 |
|
| 50 |
ENTRYPOINT ["/bin/bash", "-c", "cd && colcon build --event-handlers=console_direct+"] |