-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
79 lines (63 loc) · 2.59 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
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
# Install required packages and remove the apt packages cache when done.
RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils \
sudo \
gnupg2 \
python \
git \
curl \
lsb-release \
locales \
sqlite3 \
python3-tk && \
rm -rf /var/lib/apt/lists/*
# Set Locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
# Build script refuses to be run as root, so we need a user
RUN adduser --disabled-password --gecos '' docker
RUN adduser docker sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN chown -R docker /home/
USER docker
# Install repo
RUN mkdir /home/docker/bin
ENV PATH "/home/docker/bin:$PATH"
RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /home/docker/bin/repo
RUN chmod a+x /home/docker/bin/repo
# Install Sphinx
#RUN sudo echo "deb http://plf.parrot.com/sphinx/binary `lsb_release -cs`/" | sudo tee /etc/apt/sources.list.d/sphinx.list > /dev/null
#RUN sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 508B1AE5
#RUN sudo apt update
#RUN echo "parrot-sphinx sphinx/firmwared_users string toto" | sudo debconf-set-selections
#RUN echo "parrot-sphinx sphinx/license_approval boolean true" | sudo debconf-set-selections
#RUN DEBIAN_FRONTEND=noninteractive sudo apt-get install -q -y \
#parrot-sphinx
#RUN sudo usermod -a -G firmwared docker
# Install olympe dependencies
RUN mkdir -p /home/docker/code/parrot-groundsdk && \
cd /home/docker/code/parrot-groundsdk && \
repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git && \
repo sync
RUN cd /home/docker/code/parrot-groundsdk && \
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections && \
./products/olympe/linux/env/postinst
# Build olympe-linux
RUN cd /home/docker/code/parrot-groundsdk && \
yes 'y' | ./build.sh -p olympe-linux -A all final -j
RUN cd && \
git clone https://github.com/Duke-XPrize-Anafi-GUI/DukeXPrizeAnafiGUI
# Need to change the version for aenum
# Otherwise olympe will error (olympe.messages not found)
RUN ./home/docker/code/parrot-groundsdk/.python//py3/bin/pip3 install aenum==2.2.5
# Our python dependencies
RUN ./home/docker/code/parrot-groundsdk/.python//py3/bin/pip3 install image
# Start in olympe environment
ENTRYPOINT /bin/bash -c "cd /home/docker/DukeXPrizeAnafiGUI/; source ~/code/parrot-groundsdk/./products/olympe/linux/env/shell;"