Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker support for Iron #68

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM osrf/ros:iron-desktop
ARG USER_ID=1000
ARG GROUP_ID=1000

# install dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
unzip \
openjdk-8-jdk \
vim \
python3-pip \
terminator \
bash-completion \
curl \
libcanberra-gtk3-module \
&& apt-get -y autoremove \
&& apt-get clean


ARG USER=docker
# set user as default so install scripts look the same for local host install
RUN addgroup --gid $GROUP_ID ${USER} && \
adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID ${USER} && \
adduser ${USER} sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER ${USER}

RUN sudo apt-get update && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH=$HOME/.cargo/env:$PATH

RUN mkdir ~/ws_rmw_zenoh/src -p && cd ~/ws_rmw_zenoh/src && \
git clone https://github.com/ros2/rmw_zenoh.git && \
cd ~/ws_rmw_zenoh && \
. /opt/ros/$ROS_DISTRO/setup.sh && \
sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \
sudo rosdep init && \
rosdep update && \
rosdep install --from-paths src --ignore-src -r -y && \
. /opt/ros/$ROS_DISTRO/setup.sh && \
. $HOME/.cargo/env && \
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

# extra packages
RUN sudo apt-get update && sudo apt-get install -y \
tmux \
tmuxinator

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]

# vim: set et fenc=utf-8 ff=unix ft=dockerfile sts=0 sw=2 ts=2 :