

You'll need to copy all dependencies and if they're acquired through your package manager (apt-get), you'll leave dpkg's local database inconsistent. Copy just the files you need from the webots image using COPY -from=base.The webots image is not actually being used there. By default, the last stage in your Dockerfile will be the target (so, in your example, you're only actually using the ros2 image. This allows you to COPY from that stage specifying the -from option. When you have multiple FROM commands, you're not "inheriting" both of their contents into the same image - you're doing a multi-stage build. # Finally open a bash command to let the user interact # resolve a missing dependency for webots demo # new stuff added on top of niurover/ros2_foxy to assist with Webots + ROS2 #CMD # NOTE ignore this part of the Dockerfile
#WEBOTS FREE DOWNLOAD INSTALL#
RUN apt-get update & apt-get install -y \
#WEBOTS FREE DOWNLOAD UPGRADE#
RUN apt-get update & apt-get upgrade -y & apt-get install -y \ #FROM $BASE_IMAGE as base # NOTE commented out since satisfied by above #ARG BASE_IMAGE=osrf/ros:foxy-desktop # NOTE commented out since satisfied by above # taken from Dockerfile for niurover/ros2_foxy found at: #FROM ros:foxy-ros-base-focal # NOTE commented out since satisfied by above # generated from docker_images_ros2/create_ros_ # This is an auto generated Dockerfile for ros:desktop # taken from Dockerfile for osrf/ros:foxy-desktop-focal (or is it osrf/ros:foxy-desktop?) found at: RUN apt-get update & apt-get install -no-install-recommends -y \

# taken from Dockerfile for ros:foxy-ros-base-focal found at: # setup entrypoint # NOTE ignore this part of their Dockerfile RUN apt-get update & apt-get install -y -no-install-recommends \ RUN echo "deb focal main" > /etc/apt//ros2-latest.list RUN apt-get update & apt-get install -q -y -no-install-recommends \ # apt-get install -q -y -no-install-recommends tzdata & \ # ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime & \ # setup timezone # NOTE commented out since timezone should already be set up # taken from Dockerfile for ros:foxy-ros-core-focal found at: # container heirarchy all the way back to where it can stem off of `base` from above # niurover/ros2_foxy uses osrf/ros:foxy-desktop as its base, so I need to add code from ARG BASE_IMAGE_WEBOTS=cyberbotics/webots:R2021a-ubuntu20.04
