From a49653ddbb20a4d3e419476df45dd45cf1669417 Mon Sep 17 00:00:00 2001 From: Rufus Wong Date: Mon, 16 Dec 2024 14:42:00 -0500 Subject: [PATCH] Add DEBIAN_FRONTEND=noninteractive between sudo and apt install (#206) Signed-off-by: Rufus Wong --- moveit2/Dockerfile | 7 ++----- navigation2/Dockerfile | 5 +---- space_robots/Dockerfile | 9 +++------ 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/moveit2/Dockerfile b/moveit2/Dockerfile index 7014a03..8af8617 100644 --- a/moveit2/Dockerfile +++ b/moveit2/Dockerfile @@ -38,9 +38,6 @@ LABEL org.label-schema.url="https://github.com/space-ros" LABEL org.label-schema.vcs-url="https://github.com/space-ros/docker-images" LABEL org.label-schema.vcs-ref=${VCS_REF} -# Disable prompting during package installation -ARG DEBIAN_FRONTEND=noninteractive - # Clone all space-ros sources RUN mkdir ${SPACEROS_DIR}/src \ && vcs import ${SPACEROS_DIR}/src < ${SPACEROS_DIR}/exact.repos @@ -62,7 +59,7 @@ RUN rosdep update # Install the various build and test tools RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt install -y \ + sudo DEBIAN_FRONTEND=noninteractive apt install -y \ build-essential \ clang-format \ cmake \ @@ -141,7 +138,7 @@ RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \ # Add a couple sample GUI apps for testing RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get install -y \ + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ firefox \ glmark2 \ libcanberra-gtk3-0 \ diff --git a/navigation2/Dockerfile b/navigation2/Dockerfile index 6c6f2d7..116e1c7 100644 --- a/navigation2/Dockerfile +++ b/navigation2/Dockerfile @@ -38,9 +38,6 @@ LABEL org.label-schema.url="https://github.com/space-ros" LABEL org.label-schema.vcs-url="https://github.com/space-ros/docker-images" LABEL org.label-schema.vcs-ref=${VCS_REF} -# Disable prompting during package installation -ARG DEBIAN_FRONTEND=noninteractive - SHELL ["/bin/bash", "-c"] # Define workspace locations @@ -70,7 +67,7 @@ RUN rm -rf src build log RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt update && \ - sudo apt install -y ros-humble-rviz2 ros-humble-nav2-bringup + sudo DEBIAN_FRONTEND=noninteractive apt install -y ros-humble-rviz2 ros-humble-nav2-bringup # Set up the entrypoint COPY ./entrypoint.sh / diff --git a/space_robots/Dockerfile b/space_robots/Dockerfile index 562b8a5..7c39e91 100644 --- a/space_robots/Dockerfile +++ b/space_robots/Dockerfile @@ -40,14 +40,11 @@ ENV DEMO_DIR=${HOME_DIR}/demos_ws ENV IGNITION_VERSION fortress ENV GZ_VERSION fortress -# Disable prompting during package installation -ARG DEBIAN_FRONTEND=noninteractive - # Install base image dependencies RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt-get update -y && \ - sudo apt-get install -y \ + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ git-lfs \ python3-rosinstall-generator @@ -71,12 +68,12 @@ WORKDIR ${DEMO_DIR} # Install libmongoc for development RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get install libmongoc-dev -y + sudo DEBIAN_FRONTEND=noninteractive apt-get install libmongoc-dev -y # Compile mongo cxx driver https://mongocxx.org/mongocxx-v3/installation/linux/ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y + sudo DEBIAN_FRONTEND=noninteractive apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install