From 3f13f221e270c2d3c80282175e9f81745aaefafc Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Wed, 29 May 2019 15:30:34 +0300 Subject: [PATCH] Dockerfile to build protobuf with cpp implementation for ARM targets --- .../python/container/proto-rpi/Dockerfile | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 wrappers/python/container/proto-rpi/Dockerfile diff --git a/wrappers/python/container/proto-rpi/Dockerfile b/wrappers/python/container/proto-rpi/Dockerfile new file mode 100644 index 0000000..24858ae --- /dev/null +++ b/wrappers/python/container/proto-rpi/Dockerfile @@ -0,0 +1,27 @@ +# build protobuff wheel +FROM wirepas/base:1.0-raspbian as wm-proto-builder +RUN [ "cross-build-start" ] +USER root +ARG GIT_TAG=${GIT_TAG:-"v3.7.1"} +RUN sudo apt-get update \ + && sudo apt-get install autoconf automake libtool curl make g++ unzip git + +WORKDIR /app_build +RUN git clone https://github.com/protocolbuffers/protobuf.git \ + && cd protobuf \ + && git checkout ${GIT_TAG}\ + && git submodule update --init --recursive \ + && ./autogen.sh \ + && ./configure \ + && make \ + && make check \ + && sudo make install \ + && sudo ldconfig + +#configure --disable-shared\ + +WORKDIR /app_build/protobuf/python/ +RUN python3 setup.py build --cpp_implementation \ + && python3 setup.py test --cpp_implementation \ + +RUN [ "cross-build-end" ]