-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build_env
59 lines (47 loc) · 1.5 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
52
53
54
55
56
57
58
59
# fog-sw BUILDER
ARG ROS_DISTRO="humble"
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 IMAGE_NAME
# Install build dependencies
RUN apt-get update -y && apt-get install -y --no-install-recommends \
curl \
python3-bloom \
fakeroot \
dh-make \
libboost-dev \
libasio-dev \
libengine-pkcs11-openssl \
libp11-dev \
libssl-dev \
libtinyxml2-dev \
ros-${ROS_DISTRO}-osrf-testing-tools-cpp \
ros-${ROS_DISTRO}-performance-test-fixture \
ros-${ROS_DISTRO}-test-msgs \
&& 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 mkdir -p /$IMAGE_NAME/packaging
COPY packaging/rosdep.yaml* packaging/rosdep.sh packaging/build_deps.sh /$IMAGE_NAME/packaging/
# COPY underlay.repos package.xml /$IMAGE_NAME/packaging/
# COPY colcon.meta /$IMAGE_NAME/packaging/
# RUN /$IMAGE_NAME/packaging/rosdep.sh /$IMAGE_NAME
RUN chown -R builder:builder /$IMAGE_NAME
USER builder
RUN rosdep update
USER root
# RUN apt purge -y \
# ros-${ROS_DISTRO}-fastrtps \
# ros-${ROS_DISTRO}-fastrtps-cmake-module \
# ros-${ROS_DISTRO}-foonathan-memory-vendor
RUN dpkg -r --force-depends ros-${ROS_DISTRO}-foonathan-memory-vendor
# USER builder
# RUN /$IMAGE_NAME/packaging/build_deps.sh /$IMAGE_NAME
VOLUME /$IMAGE_NAME/sources
WORKDIR /$IMAGE_NAME/sources