-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM docker.io/ros:noetic-ros-base-focal AS base
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /opt/open_mower_ros
SHELL ["/bin/bash", "-c"]
####################################################################################################
FROM base AS dependencies
RUN --mount=type=bind,source=src,target=src \
set -o pipefail && \
rosdep install --from-paths src --ignore-src --simulate | sed -nr 's/.*apt-get install (\S+).*/\1/p' | sort > /rosdeps
####################################################################################################
FROM base AS assemble
RUN --mount=type=bind,from=dependencies,source=/rosdeps,target=/rosdeps \
--mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean && \
apt-get update && \
rosdep update --rosdistro $ROS_DISTRO && \
apt-get install --no-install-recommends --yes git $(cat /rosdeps)
COPY docker/openmower_entrypoint.sh /openmower_entrypoint.sh