Skip to content

Instantly share code, notes, and snippets.

@a-recknagel
Created June 12, 2019 13:44
Show Gist options
  • Save a-recknagel/c205af9ffed602f8827a5d9800cb7bae to your computer and use it in GitHub Desktop.
Save a-recknagel/c205af9ffed602f8827a5d9800cb7bae to your computer and use it in GitHub Desktop.
build protobuf from master on docker/ubuntu
FROM ubuntu
RUN apt update
RUN apt install -y git make autoconf automake libtool curl make g++ unzip zlib1g-dev build-essential libncursesw5-dev libreadline-gplv2-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev libbz2-dev libffi-dev
RUN git clone https://github.com/python/cpython.git
RUN cd /cpython && git checkout 3.8 && \
./configure && make && make install
RUN git clone https://github.com/protocolbuffers/protobuf.git
RUN cd /protobuf && git submodule update --init --recursive && ./autogen.sh && ./configure && make && make install
RUN cd /protobuf/python/ && python3 setup.py build && python3 setup.py test
@a-recknagel
Copy link
Author

Copy this into a file called Dockerfile, put it into an empty folder, and execute it with docker build . -t protobuf
Let it run for a couple of hours, and it should give you A LOT of output which ends with

[...]
testNestedOptions (google.protobuf.internal.descriptor_test.NewDescriptorTest) ... ok
testSimpleCustomOptions (google.protobuf.internal.descriptor_test.NewDescriptorTest) ... ok

----------------------------------------------------------------------
Ran 818 tests in 3.963s

OK (skipped=10)
Removing intermediate container 446e9316122c
 ---> b5e7609831e1
Successfully built b5e7609831e1
Successfully tagged protobuf:latest

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment