-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.debian-buildenv
46 lines (36 loc) · 1.48 KB
/
Dockerfile.debian-buildenv
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
#
# Copyright (c) 2024, Auterion AG
# All rights reserved.
#
# Dockerfile for a build environment to build Debian packages
ARG ROS2_DISTRO=humble
ARG UBUNTU_DISTRO=jammy
FROM ros:${ROS2_DISTRO}-ros-base-${UBUNTU_DISTRO}
# Re-request ARGs to make them available in this stage
ARG ROS2_DISTRO
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA
RUN apt update && apt install -y \
dh-make \
python3-bloom \
python3-rosdep \
fakeroot \
dh-python
# Add auterion cloudsmith
RUN curl -1sLf \
'https://dl.cloudsmith.io/public/auterion/public/setup.deb.sh' \
| bash
RUN echo "yaml file:///work/rosdep-${ROS2_DISTRO}.yaml" > /etc/ros/rosdep/sources.list.d/99-local.list
RUN echo "#!/bin/bash" > /build_package.sh && \
echo "rosdep update --rosdistro=$ROS2_DISTRO" >> /build_package.sh && \
echo "rosdep install --from-paths . -y -v" >> /build_package.sh && \
echo "bloom-generate rosdebian" >> /build_package.sh && \
echo "/scripts/fix_debian_control.sh" >> /build_package.sh && \
echo "fakeroot debian/rules binary" >> /build_package.sh && \
echo "mkdir -p /work/output" >> /build_package.sh && \
echo "cp ../*.deb /work/output" >> /build_package.sh && \
echo "cp ../*.ddeb /work/output" >> /build_package.sh && \
chmod +x /build_package.sh
COPY fix_debian_control.sh /scripts/fix_debian_control.sh
WORKDIR /work
CMD [ "/ros_entrypoint.sh", "/build_package.sh" ]