-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
51 lines (40 loc) · 1.45 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
FROM ros:noetic
# 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 upgrade && apt-get -y install \
curl ssh python3-pip \
&& rm -rf /var/lib/apt/lists/*
# 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
ARG FR_VERBOSE="false"
ARG FR_VERSION="latest"
# Override these variables when running the image
ENV FR_ACCOUNT="INSTALL_ONLY"
ENV FR_DEVICE="GENERIC_DEVICE"
ENV FR_TOKEN="INSTALL_ONLY_DEVICE_TOKEN"
ENV FR_SECRET=""
ENV FR_INSTALL_ELEMENTS="warn_no_fail,no_credentials,service_none,webrtc"
ENV FR_URL="https://api.freedomrobotics.ai/accounts/${FR_ACCOUNT}/devices/${FR_DEVICE}/installscript?\
mc_token=${FR_TOKEN}\
&code_version=${FR_VERSION}\
&install_elements=${FR_INSTALL_ELEMENTS}\
&auto_install_deps=true\
&ppa_is_allowed=true\
&verbose=${FR_VERBOSE}"
# Install Freedom agent
RUN curl -s "${FR_URL}" | python3 \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /root/.cache/pip/*
# Install catkin-tools
RUN apt-get update && apt-get install -y python3-catkin-tools \
&& rm -rf /var/lib/apt/lists/*
# Install Freedom scripts
RUN mkdir /freedom
COPY ./freedom_register.py /freedom/
COPY ./freedom_keep_alive.py /freedom/
COPY ./entrypoint.sh /freedom/
ENTRYPOINT ["/freedom/entrypoint.sh"]