Fix upstream for rodep install in devcontainer
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# syntax=docker/dockerfile:1.7-labs
|
||||
FROM osrf/ros:jazzy-desktop-full
|
||||
ARG USERNAME=USERNAME
|
||||
ARG USER_UID=1000
|
||||
@@ -51,19 +52,17 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGE
|
||||
python3-vcstool \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# system deps from frozen rosdep manifest — no rosdep at build or startup
|
||||
# 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
|
||||
# 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/*
|
||||
# Copy boilerplate project config into workspace so it can be parsed by rosdep.
|
||||
# This will be obscured by the volume mount or the workspace in the devcontainer
|
||||
# Don't include all sources, because the rosdep will re-process on any file change
|
||||
COPY --parents src/**/package.xml src/**/COLCON_IGNORE src/
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
&& rosdep update --rosdistro $ROS_DISTRO \
|
||||
&& rosdep install --from-paths src --ignore-src -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
apt-get update \
|
||||
|
||||
Reference in New Issue
Block a user