forked from tiiuae/fog_msgs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build_env
51 lines (39 loc) · 1.45 KB
/
Dockerfile.build_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
# fog-sw BUILDER
ARG ROS_DISTRO="galactic"
FROM ros:${ROS_DISTRO}-ros-base as fog-sw-builder
ARG UID=1000
ARG GID=1000
ARG BUILD_NUMBER
ARG COMMIT_ID
ARG GIT_VER
ARG PACKAGE_NAME
# Install build dependencies
RUN apt-get update -y && apt-get install -y --no-install-recommends \
curl \
python3-bloom \
fakeroot \
dh-make \
libboost-dev \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g $GID builder && \
useradd -m -u $UID -g $GID -g builder builder && \
usermod -aG sudo builder && \
echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN echo "deb [trusted=yes] https://ssrc.jfrog.io/artifactory/ssrc-debian-public-remote focal fog-sw" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-$ROS_DISTRO-rmw-fastrtps-cpp \
ros-$ROS_DISTRO-rmw-fastrtps-shared-cpp \
ros-$ROS_DISTRO-rmw-implementation \
ros-$ROS_DISTRO-rosidl-typesupport-fastrtps-cpp \
ros-$ROS_DISTRO-rosidl-typesupport-fastrtps-c \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /$PACKAGE_NAME/packaging
COPY packaging/rosdep.yaml* packaging/rosdep.sh packaging/build_deps.sh /$PACKAGE_NAME/packaging/
COPY underlay.repos package.xml /$PACKAGE_NAME/packaging/
RUN /$PACKAGE_NAME/packaging/rosdep.sh /$PACKAGE_NAME
RUN chown -R builder:builder /$PACKAGE_NAME
USER builder
RUN rosdep update
RUN /$PACKAGE_NAME/packaging/build_deps.sh /$PACKAGE_NAME
VOLUME /$PACKAGE_NAME/sources
WORKDIR /$PACKAGE_NAME/sources