Skip to content

Instantly share code, notes, and snippets.

@iravid
Created November 8, 2018 14:35
Show Gist options
  • Save iravid/2adc839a89ca3f3e6763457b02a36b2e to your computer and use it in GitHub Desktop.
Save iravid/2adc839a89ca3f3e6763457b02a36b2e to your computer and use it in GitHub Desktop.
FROM alpine:3.8 as builder
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >>/etc/apk/repositories
RUN apk add --update --no-cache build-base linux-headers git cmake bash zlib zlib-dev bzip2 bzip2-dev snappy snappy-dev lz4 lz4-dev zstd@community zstd-dev@community jemalloc jemalloc-dev libtbb-dev@testing libtbb@testing
RUN cd /tmp && \
git clone https://github.com/gflags/gflags.git && \
cd gflags && \
mkdir build && \
cd build && \
cmake -DBUILD_SHARED_LIBS=1 -DGFLAGS_INSTALL_SHARED_LIBS=1 .. && \
make install && \
cd /tmp && \
rm -R /tmp/gflags/
RUN cd /tmp && \
git clone https://github.com/facebook/rocksdb.git && \
cd rocksdb && \
git checkout v5.7.3 && \
make tools && \
cp /tmp/rocksdb/ldb /usr/bin/ && \
cp /tmp/rocksdb/sst_dump /usr/bin/
FROM alpine:3.8
COPY --from=builder /usr/bin/ldb /usr/bin
COPY --from=builder /usr/bin/sst_dump /usr/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment