This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
88 lines (68 loc) · 2.32 KB
/
Dockerfile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM ros:melodic
# These values will be overrided by `docker run --env <key>=<value>` command
ENV ROS_IP 127.0.0.1
ENV ROS_MASTER_URI http://127.0.0.1:11311
# Install some basic dependencies
RUN apt-get update && apt-get -y install \
curl ssh \
ros-melodic-cv-bridge \
ros-melodic-tf \
python-pip python3-pip \
python-rosdep \
python-catkin-tools \
python-vcstool \
ros-melodic-xacro \
ros-melodic-map-server \
ros-melodic-ar-track-alvar \
ros-melodic-rqt-graph \
sl \
&& rm -rf /var/lib/apt/lists/*
# ALIASES :D
RUN alias ..="cd .."
# Set root password
RUN echo 'root:root' | chpasswd
# Permit SSH root login
RUN sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
# Install Freedom agent
ARG FREEDOM_URL
RUN curl -sSf $FREEDOM_URL | \
sed 's:a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip:c/4VmDzA7iaHb/ngrok-stable-linux-arm64.zip:' | python \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /root/.cache/pip/*
# Install catkin-tools
RUN apt-get update && apt-get install -y python-catkin-tools \
&& rm -rf /var/lib/apt/lists/*
# Copy packages and build the workspace
WORKDIR /catkin_ws
COPY leo-erc.repos ./
COPY src ./src
COPY map ./map
RUN vcs import < leo-erc.repos
COPY launch ./launch
#COPY controllers.yaml ./src/leo_gazebo/config/
RUN apt-get update \
&& rosdep update \
&& rosdep install --from-paths src -iy \
&& rm -rf /var/lib/apt/lists/*
RUN catkin config --extend /opt/ros/melodic && catkin build
COPY start.sh /
RUN apt update && apt upgrade -y && apt install vim -y
# ===================== AR TAGS ===========================
# allow for AR tags to be inserted into the gazebo world sim
## install dependencies for gazebo_models generation
##RUN apt-get install imagemagick -y
##COPY ar_tags/marsyard.world ./src/marsyard/worlds/
## do the thing
### HACKY --> ammend later (maybe)
##RUN mkdir -p /root/.gazebo/models \
## && cp -r /catkin_ws/src/gazebo_models/ar_tags/model/marker0/ /root/.gazebo/models \
## && cd /catkin_ws/src/gazebo_models/ar_tags/images \
## && mv Marker0.png t \
## && mkdir -p /root/temp \
## && mv Marker* /root/temp \
## && mv t Marker0.png \
## && cd ../scripts/ \
## && ./generate_markers_model.py -i ../images/ -s 146 -w 25 \
## && cp -r /root/.gazebo/models/marker0 /catkin_ws/src/marsyard/models/
ENTRYPOINT []
CMD ["/start.sh"]