Last active
July 30, 2022 02:26
-
-
Save cst0/e487be155179ce5b181c2087ca4088f9 to your computer and use it in GitHub Desktop.
Dockerfile to construct a clean environment for the ros2-port branch of ccny/scan_tools.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To use this dockerfile: | |
# 1) Copy these contents a file named "Dockerfile" | |
# 2) Build with the command `docker build -t scan_tools .` (assuming you're in a directory with this file) | |
# 3) Running with `docker run --net=host -it --rm scan_tools /bin/bash` allows this to talk to nodes outside of the container | |
FROM ubuntu:20.04 | |
# get set up for install | |
ENV LANG C.UTF-8 | |
ENV LC_ALL C.UTF-8 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt update && apt install -y curl gnupg2 lsb-release git build-essential pkg-config libgsl-dev libeigen3-dev | |
# install ros foxy | |
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | |
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
RUN apt update | |
RUN apt install -y ros-foxy-ros-base | |
# clone the code for this PR: | |
WORKDIR /ws/src | |
RUN git clone https://github.com/malban/scan_tools.git -b ros2-port | |
RUN git clone https://github.com/malban/csm.git -b pkg-config | |
#RUN git clone https://github.com/AndreaCensi/csm.git | |
# install final deps and colcon-build it | |
RUN apt install -y ros-foxy-nav-msgs ros-foxy-laser-geometry tf2* python3-colcon-common-extensions | |
RUN /bin/bash -c "source /opt/ros/foxy/setup.bash && colcon build" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment