forked from zkytony/robotdev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.noetic
62 lines (56 loc) · 2.21 KB
/
Dockerfile.noetic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This image allows you to have a Ubuntu 20.04 + ROS Noetic setup.
# You can mount the path to the 'robotdev' repository in your host
# machine to the same path in the container. We ask you to use the
# same username in the container as in your host machine. This
# simplifies the maintenance of the 'robotdev' repository.
# This setup relies on the nice ros:noetic image provided
# on Docker Hub.
# /author: Kaiyu Zheng
FROM ros:noetic
# do this to avoid hanging
ENV DEBIAN_FRONTEND=noninteractive
# Install software
RUN apt-get clean
RUN apt-get update
RUN apt-get install -y --no-install-recommends apt-utils
RUN apt-get install -y emacs
RUN apt-get install -y sudo
RUN apt-get install -y python3-pip
RUN apt-get install -y net-tools
RUN apt-get install -y iputils-ping
RUN apt-get install -y git
RUN apt-get install -y python3-virtualenv
RUN apt-get install -y gdb
RUN apt-get install -y mlocate
RUN apt-get install -y openssh-client openssh-server
RUN apt-get install -y ros-noetic-desktop-full
RUN apt-get install -y ros-noetic-rviz-imu-plugin
RUN apt-get install -y ros-noetic-navigation
RUN apt-get install -y ros-noetic-ros-control ros-noetic-ros-controllers
RUN apt-get install -y ros-noetic-interactive-marker-twist-server
RUN apt-get install -y ros-noetic-joy
RUN apt-get install -y ros-noetic-twist-mux
RUN apt-get install -y ros-noetic-teleop-twist-joy
RUN apt-get install -y ros-noetic-depthimage-to-laserscan
ARG hostuser
ARG hostgroup
ARG hostuid
ARG hostgid
RUN echo Host user is $hostuser:$hostuser
RUN groupadd --gid $hostgid $hostgroup
RUN adduser --disabled-password --gecos '' --gid $hostgid --uid $hostuid $hostuser
RUN adduser $hostuser sudo
# Ensure sudo group users are not asked for a password when using sudo command
# by ammending sudoers file
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> \
/etc/sudoers
USER $hostuser
WORKDIR /home/$hostuser
ENV HOME=/home/$hostuser
RUN mkdir $HOME/repo
# Different shell color
RUN echo "export PS1='\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]$ '" >> $HOME/.bashrc
# print some info on start
RUN echo "echo -e 'Welcome! You are now in a docker container ().'" >> $HOME/.bashrc
RUN echo "echo -e \"Docker ID: $(basename $(cat /proc/1/cpuset))\"" >> $HOME/.bashrc
CMD ["bash"]