Skip to content

Commit

Permalink
Update Go version in the build container. (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
M. J. Fromberger authored Nov 8, 2021
1 parent c339e65 commit 8882f27
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
FROM golang
FROM golang:1.16-alpine

ENV LD_LIBRARY_PATH=/usr/local/lib

RUN apt-get update && apt-get install -y --no-install-recommends \
libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev make tar wget
RUN apk add bash build-base bzip2-dev gflags-dev linux-headers \
perl snappy-dev util-linux wget zlib-dev zstd-dev

# Install cleveldb
RUN \
wget https://github.com/google/leveldb/archive/v1.20.tar.gz \
wget -q https://github.com/google/leveldb/archive/v1.20.tar.gz \
&& tar xvf v1.20.tar.gz \
&& cd leveldb-1.20 \
&& make \
&& cp -a out-static/lib* out-shared/lib* /usr/local/lib \
&& cd include \
&& cp -a leveldb /usr/local/include \
&& ldconfig \
&& ldconfig $LD_LIBRARY_PATH \
&& cd ../.. \
&& rm -rf v1.20.tar.gz leveldb-1.20

# Install Rocksdb
RUN \
wget https://github.com/facebook/rocksdb/archive/v6.6.4.tar.gz \
wget -q https://github.com/facebook/rocksdb/archive/v6.6.4.tar.gz \
&& tar -zxf v6.6.4.tar.gz \
&& cd rocksdb-6.6.4 \
&& sed -i'' 's/install -C/install -c/g' Makefile \
&& DEBUG_LEVEL=0 make -j4 shared_lib \
&& make install-shared \
&& ldconfig \
&& ldconfig $LD_LIBRARY_PATH \
&& cd .. \
&& rm -rf v6.6.4.tar.gz rocksdb-6.6.4

0 comments on commit 8882f27

Please sign in to comment.