Created
February 20, 2019 17:14
-
-
Save bbinet/78409b03287a4b4705c227297276db88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM resin/amd64-debian:stretch | |
MAINTAINER Bruno Binet <[email protected]> | |
ENV IMAGE_VERSION 1.0 | |
ENV LANG C.UTF-8 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update -yq && \ | |
apt-get install -yq --no-install-recommends \ | |
gcc g++ git automake autoconf libtool pkg-config make patch ca-certificates wget zlib1g-dev libpq5 libpq-dev postgresql-server-dev-all cmake libssl1.0-dev curl unzip libc-ares2 libc-ares-dev libgoogle-perftools4 libsystemd-dev librdkafka-dev libmaxminddb0 libmaxminddb-dev && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN mkdir -p /build/debs | |
RUN wget -O /build/protobuf-cpp-3.5.1.tar.gz https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz && \ | |
tar xf /build/protobuf-cpp-3.5.1.tar.gz -C /build && \ | |
cd /build/protobuf-3.5.1/ && \ | |
./configure "CFLAGS=-fPIC" "CXXFLAGS=-fPIC" && \ | |
make && \ | |
make check && \ | |
make install && \ | |
ldconfig && \ | |
rm -fr /build/protobuf-* | |
RUN wget -O /build/grpc-1.11.1.tar.gz https://github.com/grpc/grpc/archive/v1.11.1.tar.gz && \ | |
tar xf /build/grpc-1.11.1.tar.gz -C /build && \ | |
cd /build/grpc-1.11.1/ && \ | |
make && \ | |
make install && \ | |
rm -fr /build/grpc* | |
ENV VERSION_GAPIS 913ad3a003b2699e8deb80ffd6c47d28a1bddf0e | |
RUN wget -O /build/googleapis.tar.gz https://github.com/googleapis/googleapis/archive/${VERSION_GAPIS}.tar.gz && \ | |
mkdir /build/googleapis && \ | |
tar xf /build/googleapis.tar.gz -C /build/googleapis --strip-components=1 && \ | |
cd /build/googleapis && \ | |
make OUTPUT=/usr/local/include && \ | |
rm -fr /build/googleapis* | |
# remove the shared libraries to force it to statically link with grpc | |
# as their pkg-config output will not produce what is needed in the | |
# GRPC_STATIC_LIBRARIES variable. | |
RUN rm -f /usr/local/lib/*.so* | |
ENV VERSION_LSB e5e923525cea9b9c21c212eb1422c1a92ce8d4ba | |
RUN mkdir -p /build/lua_sandbox/release && \ | |
wget -O /build/lua_sandbox.tar.gz https://github.com/mozilla-services/lua_sandbox/archive/${VERSION_LSB}.tar.gz && \ | |
tar -xf /build/lua_sandbox.tar.gz -C /build/lua_sandbox --strip-components=1 && \ | |
cd /build/lua_sandbox/release && \ | |
cmake -DCMAKE_BUILD_TYPE=release .. && \ | |
make && \ | |
ctest && \ | |
make install && \ | |
cpack -G DEB && \ | |
mv *.deb /build/debs && \ | |
rm -fr /build/lua_sandbox* | |
ENV VERSION_SA d4d8eb4793a6d7b1a40648b2105f6aa542cb8d72 | |
RUN mkdir -p /build/streaming_algorithms/release && \ | |
wget -O /build/streaming_algorithms.tar.gz https://github.com/trink/streaming_algorithms/archive/${VERSION_SA}.tar.gz && \ | |
tar -xf /build/streaming_algorithms.tar.gz -C /build/streaming_algorithms --strip-components=1 && \ | |
cd /build/streaming_algorithms/release && \ | |
cmake -DCMAKE_BUILD_TYPE=release -DCPACK_GENERATOR=DEB .. && \ | |
make && \ | |
ctest && \ | |
make packages && \ | |
mv *.deb /build/debs && \ | |
rm -fr /build/streaming_algorithms* | |
ENV VERSION_LSBEXT c68549e2f351d4fef6d115fa730aa609a38aa3a0 | |
RUN mkdir -p /build/lua_sandbox_extensions/release && \ | |
wget -O /build/lua_sandbox_extensions.tar.gz https://github.com/bbinet/lua_sandbox_extensions/archive/${VERSION_LSBEXT}.tar.gz && \ | |
tar -xf /build/lua_sandbox_extensions.tar.gz -C /build/lua_sandbox_extensions --strip-components=1 && \ | |
cd /build/lua_sandbox_extensions/release && \ | |
cmake -DCMAKE_BUILD_TYPE=release -DCPACK_GENERATOR=DEB -DENABLE_ALL_EXT=true \ | |
-DEXT_aws=off -DEXT_jose=off -DEXT_parquet=off -DEXT_moz_pioneer=off .. && \ | |
make && \ | |
ctest ; \ | |
make packages && \ | |
mv *.deb /build/debs && \ | |
rm -fr /build/lua_sandbox_extensions* | |
ENV VERSION_HS v0.15.3-hl1 | |
RUN mkdir -p /build/hindsight/release && \ | |
wget -O /build/hindsight.tar.gz https://github.com/helioslite/hindsight/archive/${VERSION_HS}.tar.gz && \ | |
tar -xf /build/hindsight.tar.gz -C /build/hindsight --strip-components=1 && \ | |
cd /build/hindsight/release && \ | |
cmake -DCMAKE_BUILD_TYPE=release .. && \ | |
make && \ | |
ctest && \ | |
cpack -G DEB && \ | |
mv *.deb /build/debs && \ | |
rm -fr /build/hindsight* | |
CMD ["ls", "-alrt", "/build/debs"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment