forked from Restream/reindexer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (35 loc) · 1.41 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
FROM alpine:latest AS build
RUN cd /tmp && \
apk update && \
apk add git curl autoconf automake libtool linux-headers g++ make libunwind-dev && \
git clone https://github.com/gperftools/gperftools.git && \
cd gperftools && \
echo "noinst_PROGRAMS =" >> Makefile.am && \
./autogen.sh && ./configure && make -j8 && make install && \
cd ..
ADD . /src
WORKDIR /src
RUN ./dependencies.sh && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && \
make -j8 reindexer_server reindexer_tool && \
make install -C cpp_src/cmd/reindexer_server && \
make install -C cpp_src/cmd/reindexer_tool && \
cp ../cpp_src/cmd/reindexer_server/contrib/entrypoint.sh /entrypoint.sh && \
rm -rf /usr/local/lib/*.a /usr/local/include /usr/local/lib/libtcmalloc_debug* /usr/local/lib/libtcmalloc_minimal* \
/usr/local/lib/libprofiler* /usr/local/lib/libtcmalloc.* /usr/local/share/doc /usr/local/share/man /usr/local/share/perl5 /usr/local/bin/pprof*
FROM alpine:latest
COPY --from=build /usr/local /usr/local
COPY --from=build /entrypoint.sh /entrypoint.sh
RUN apk update && apk add libstdc++ libunwind snappy libexecinfo leveldb && rm -rf /var/cache/apk/*
ENV RX_DATABASE /db
ENV RX_CORELOG stdout
ENV RX_HTTPLOG stdout
ENV RX_RPCLOG stdout
ENV RX_SERVERLOG stdout
ENV RX_LOGLEVEL info
RUN chmod +x /entrypoint.sh
EXPOSE 9088 6534
ENTRYPOINT ["/entrypoint.sh"]
CMD [""]