-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
16 additions
and
29 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
ARG BASE=ubuntu:20.04 | ||
FROM $BASE | ||
FROM golang:1.18-alpine | ||
|
||
LABEL maintainer="DKV Developers ([email protected])" | ||
|
||
RUN apt-get update && \ | ||
# Install basic utilities | ||
apt-get install --yes --allow-unauthenticated adduser vim sudo git curl unzip build-essential \ | ||
# Install Compression libs | ||
zlib1g-dev libbz2-dev libsnappy-dev liblz4-dev && \ | ||
# Cleanup | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories | ||
|
||
# Install ZStandard lib | ||
RUN curl -fsSL https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-1.4.4.tar.gz | tar xz \ | ||
&& cd zstd-1.4.4 && make install | ||
# Build tools | ||
RUN apk add --update --no-cache linux-headers git make cmake gcc g++ musl musl-dev binutils autoconf automake libtool pkgconfig check-dev file patch bash curl dpkg nano | ||
|
||
# Install RocksDB v6.5.3 | ||
RUN curl -fsSL https://github.com/facebook/rocksdb/archive/v6.22.1.tar.gz | tar xz \ | ||
&& cd rocksdb-6.22.1 && make install | ||
# Dependencies | ||
RUN apk add --update --no-cache zlib zlib-dev zlib-static bzip2 bzip2-dev bzip2-static snappy snappy-dev snappy-static lz4 lz4-dev lz4-static gflags-dev zstd zstd-dev zstd-static | ||
|
||
# Install GoLang | ||
RUN curl -fsSL https://dl.google.com/go/go1.18.1.linux-$(dpkg --print-architecture).tar.gz | tar xz \ | ||
&& chown -R root:root ./go && mv ./go /usr/local | ||
ENV PATH="/usr/local/go/bin:${PATH}" | ||
# Install RocksDB | ||
RUN git clone --branch v6.22.1 --depth 1 https://github.com/facebook/rocksdb.git && \ | ||
cd rocksdb && \ | ||
# Fix 'install -c' flag | ||
sed -i 's/install -C/install -c/g' Makefile && \ | ||
make -j4 static_lib && make install-static | ||
|
||
# Install Protobuf | ||
#RUN curl -fsSL -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip \ | ||
# && unzip protoc.zip -d protoc && chown -R root:root ./protoc && mv ./protoc /usr/local && rm protoc.zip | ||
#ENV PATH="/usr/local/protoc/bin:${PATH}" | ||
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | ||
|
||
# Install DKV (Skipped for CI Pipelines) | ||
ARG CI | ||
ARG GIT_SHA=master | ||
RUN if [ -z "$CI" ] ; then git clone https://github.com/flipkart-incubator/dkv.git \ | ||
&& cd dkv && git checkout $GIT_SHA && GOOS=linux GOARCH=$(dpkg --print-architecture) make build \ | ||
&& cd dkv && git checkout $GIT_SHA && GOOS=linux GOARCH=$(dpkg --print-architecture | awk -F'-' '{print $NF}') make build \ | ||
&& mv ./bin /usr/local/dkv && chown -R root:root /usr/local/dkv; fi | ||
|
||
ENV PATH="/usr/local/dkv:${PATH}" | ||
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | ||
|
||
CMD ["dkvsrv"] |
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