Skip to content

Instantly share code, notes, and snippets.

@leviathan747
Created May 31, 2019 18:35
Show Gist options
  • Save leviathan747/efd00b92a2bb44bbba2af4c44c4704e7 to your computer and use it in GitHub Desktop.
Save leviathan747/efd00b92a2bb44bbba2af4c44c4704e7 to your computer and use it in GitHub Desktop.
Dockerfile for building an image based on https://github.com/fcwu/docker-ubuntu-vnc-desktop with ROS desktop installed.
FROM dorowu/ubuntu-desktop-lxde-vnc
# install packages
RUN apt-get update && apt-get install -q -y \
dirmngr \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO melodic
RUN apt-get update && apt-get install -y \
ros-melodic-ros-core=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# base
RUN apt-get update && apt-get install -y \
ros-melodic-ros-base=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# robot
RUN apt-get update && apt-get install -y \
ros-melodic-robot=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# desktop
RUN apt-get update && apt-get install -y \
ros-melodic-desktop=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# desktop-full
RUN apt-get update && apt-get install -y \
ros-melodic-desktop-full=1.4.1-0* \
&& rm -rf /var/lib/apt/lists/*
# extras
RUN echo "source /opt/ros/melodic/setup.sh" >> /root/.profile
RUN echo "source /opt/ros/melodic/setup.sh" >> /root/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment