Fix livox driver build
Also add caching to the apt-get installs
This commit is contained in:
@@ -19,13 +19,15 @@ RUN groupadd --gid $USER_GID $USERNAME \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Make sure the base image is completely up to date
|
||||
RUN apt-get update \
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# C++ development tools
|
||||
RUN apt-get update \
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
@@ -37,7 +39,8 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Python development tools
|
||||
RUN apt-get update \
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
@@ -52,17 +55,18 @@ RUN apt-get update \
|
||||
# NOTE: There should be a check in your CI that this file is up to date.
|
||||
# Something like:
|
||||
# ./scripts/freeze-rosdep.sh && git diff --exit-code rosdep-packages.txt
|
||||
COPY rosdep-packages.txt /tmp/rosdep-packages.txt
|
||||
# COPY rosdep-packages.txt /tmp/rosdep-packages.txt
|
||||
# The --mount=type=cache option caches the apt packages with buildkit
|
||||
# The id-apt-cache-${TARGETARCH} option allows for separate caches for different architectures
|
||||
# this enables parallel builds for different architectures without cache conflicts
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& apt-get update \
|
||||
&& xargs -r -a /tmp/rosdep-packages.txt apt-get install -y --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
# rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
# && apt-get update \
|
||||
# && xargs -r -a /tmp/rosdep-packages.txt apt-get install -y --no-install-recommends \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update \
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
Reference in New Issue
Block a user