Unity-Technologies/Robotics-Nav2-SLAM-Example

Failed to resolve: process...

nyck33 opened this issue · 0 comments

nyck33 commented
@LAPTOP-DNCQ5AAC:/mnt/d/ros/Robotics-Nav2-SLAM-Example/ros2_docker$ docker build -t unity-robotics:nav2-slam-example ./
[+] Building 210.4s (10/15)
 => [internal] load .dockerignore                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                        0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                   0.1s
 => => transferring dockerfile: 3.42kB                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal                                                                                                        1.8s
 => [auth] dorowu/ubuntu-desktop-lxde-vnc:pull token for registry-1.docker.io                                                                                                          0.0s
 => [internal] load build context                                                                                                                                                      0.6s
 => => transferring context: 4.04kB                                                                                                                                                    0.6s
 => [ 1/10] FROM docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal@sha256:07e51eafb6e0923759105eeb8cfc8f0d19be77a212b19f116313153f1272ff1b                                                0.0s
 => CACHED [ 2/10] RUN echo "Set disable_coredump false" >> /etc/sudo.conf                                                                                                             0.0s
 => [ 3/10] RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -                                                                                    1.0s
 => [ 4/10] RUN apt-get update -q &&     apt-get upgrade -yq &&     apt-get install -yq         wget         curl         git         build-essential         vim         sudo       205.8s
 => ERROR [ 5/10] RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 &&     curl -s https://raw.githubusercontent.com/ro  1.6s
------
 > [ 5/10] RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 &&     curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - &&     echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" >         /etc/apt/sources.list.d/ros2-latest.list &&     apt-get update -q &&     apt-get install -y --no-install-recommends       ros-galactic-ros-base       python3-rosdep       python3-colcon-common-extensions       python3-vcstool     && rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list:
#0 0.573 Warning: apt-key output should not be parsed (stdout is not a terminal)
#0 0.590 Executing: /tmp/apt-key-gpghome.0P79lPfsDS/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
#0 1.567 gpg: CRC error; 69B924 - 6C9712
#0 1.567 gpg: read_block: read error: Invalid keyring
#0 1.567 gpg: Total number processed: 0
------
Dockerfile:38
--------------------
  37 |     # Install the immutable components BEFORE we copy in build context stuff to keep the rebuild process manageable
  38 | >>> RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
  39 | >>>     curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
  40 | >>>     echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > \
  41 | >>>         /etc/apt/sources.list.d/ros2-latest.list && \
  42 | >>>     apt-get update -q && \
  43 | >>>     apt-get install -y --no-install-recommends \
  44 | >>>       ros-${ROS_DISTRO}-ros-base \
  45 | >>>       python3-rosdep \
  46 | >>>       python3-colcon-common-extensions \
  47 | >>>       python3-vcstool \
  48 | >>>     && rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list
  49 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 &&     curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - &&     echo \"deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main\" >         /etc/apt/sources.list.d/ros2-latest.list &&     apt-get update -q &&     apt-get install -y --no-install-recommends       ros-${ROS_DISTRO}-ros-base       python3-rosdep       python3-colcon-common-extensions       python3-vcstool     && rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list" did not complete successfully: exit code: 2

My edited Dockerfile after adding a line from another issue on this repo:

# adapted from: https://github.com/Tiryoh/docker-ros2-desktop-vnc
FROM dorowu/ubuntu-desktop-lxde-vnc:focal
LABEL maintainer="Unity Robotics <unity-robotics@unity3d.com>"

ENV DEBIAN_FRONTEND noninteractive
ENV DEV_NAME=rosdev
ENV ROS_DISTRO=galactic
ENV GROUP_NAME=ros
ENV WS_NAME=colcon_ws



RUN echo "Set disable_coredump false" >> /etc/sudo.conf
#https://github.com/Unity-Technologies/Robotics-Nav2-SLAM-Example/issues/48#issuecomment-1182130058

RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

RUN apt-get update -q && \
    apt-get upgrade -yq && \
    apt-get install -yq \
        wget \
        curl \
        git \
        build-essential \
        vim \
        sudo \
        gnupg2 \
        lsb-release \
        locales \
        bash-completion \
        tzdata \
        gosu \
        python3-argcomplete \
        python3-pip \
    && rm -rf /var/lib/apt/lists/*

# Install the immutable components BEFORE we copy in build context stuff to keep the rebuild process manageable
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
    echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > \
        /etc/apt/sources.list.d/ros2-latest.list && \
    apt-get update -q && \
    apt-get install -y --no-install-recommends \
      ros-${ROS_DISTRO}-ros-base \
      python3-rosdep \
      python3-colcon-common-extensions \
      python3-vcstool \
    && rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list

RUN useradd --create-home --home-dir /home/${DEV_NAME} --shell /bin/bash --user-group --groups adm,sudo ${DEV_NAME} && \
    echo "$DEV_NAME:$DEV_NAME" | chpasswd && \
    echo "$DEV_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
COPY --chown=${DEV_NAME} colcon_ws /home/${DEV_NAME}/colcon_ws
COPY ros2-setup.bash /bin/ros2-setup.bash
# Doing a second fetch of sources & apt-get update here, because these ones depend on the state of the build context
# in our repo
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
    echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > \
        /etc/apt/sources.list.d/ros2-latest.list && \
    apt-get update -q && \
    rosdep init && \
    chmod +x /bin/ros2-setup.bash && \
    gosu ${DEV_NAME} /bin/ros2-setup.bash && \
    runuser -u ${DEV_NAME} ros2-setup.bash && \
    rm /bin/ros2-setup.bash && \
    rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list

RUN echo ". /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/${DEV_NAME}/.bashrc && \
    echo ". /home/${DEV_NAME}/${WS_NAME}/install/local_setup.bash" >> /home/${DEV_NAME}/.bashrc

ENV TURTLEBOT3_MODEL=waffle_pi

# To bring up tb3 simulation example (from https://navigation.ros.org/tutorials/docs/navigation2_with_slam.html)
# cd catkin_ws && source install/setup.bash && ros2 launch nav2_bringup tb3_simulation_launch.py slam:=True

# Informs the environment that the default user is not root, but instead DEV_NAME
ENV USER ${DEV_NAME}