forked from mavlink/MAVSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
70 lines (58 loc) · 2.01 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
#
# Development environment for DroneCore
#
# Author: Julian Oes <julian@oes.ch>
#
FROM ubuntu:xenial
MAINTAINER Julian Oes <julian@oes.ch>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -y --quiet --no-install-recommends install \
cmake \
build-essential \
colordiff \
git \
libcurl4-openssl-dev \
doxygen \
autoconf \
libtool \
wget \
ca-certificates \
autoconf \
automake \
python \
python-pip \
libtinyxml2-dev \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
# We need the latest astyle version
RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/a/astyle/astyle_3.0.1-1ubuntu1_amd64.deb \
&& dpkg -i astyle_3.0.1-1ubuntu1_amd64.deb \
&& rm astyle_3.0.1-1ubuntu1_amd64.deb
RUN pip install grpcio grpcio-tools
# Install gRPC according to https://github.com/grpc/grpc/blob/v1.6.x/INSTALL.md
# And to fix build error https://github.com/grpc/grpc/issues/12316
# Install gRPC and protobuf into /opt in order not to mess up the host system.
# Also, we need to patch the Makefile because it install the libraries with
# wrong versions.
RUN mkdir /opt/grpc && chown $USER:$USER /opt/grpc
RUN mkdir /opt/protobuf && chown $USER:$USER /opt/protobuf
ADD grpc/0001-Makefile-fix-wrong-C-version-suffix.patch 0001-Makefile-fix-wrong-C-version-suffix.patch
RUN git clone -b v1.7.x https://github.com/grpc/grpc \
&& cd grpc \
&& git submodule update --init \
&& git apply ../0001-Makefile-fix-wrong-C-version-suffix.patch \
&& make -j8 HAS_SYSTEM_PROTOBUF=false \
&& make prefix=/opt/grpc install \
&& cd third_party/protobuf \
&& make clean \
&& ./configure --prefix=/opt/protobuf \
&& make -j8 \
&& make install \
&& cd ../../.. \
&& rm -rf grpc
ENV GRPC_DIR=/opt/grpc
ENV PROTOBUF_DIR=/opt/protobuf
CMD ["/bin/bash"]
WORKDIR "/home/docker1000/src/DroneCore"