From 8882f2706633b2944b4084961fab1aaeb7ec3c09 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Mon, 8 Nov 2021 08:05:09 -0800 Subject: [PATCH] Update Go version in the build container. (#195) --- tools/Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/Dockerfile b/tools/Dockerfile index 2c26e0b9c..c34f1c159 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -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