mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
Update dev Dockerfile
This commit is contained in:
parent
939812f6bd
commit
a478d1b482
2 changed files with 66 additions and 51 deletions
66
tools/Dockerfile
Normal file
66
tools/Dockerfile
Normal file
|
@ -0,0 +1,66 @@
|
|||
FROM ubuntu:18.04
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y software-properties-common && \
|
||||
add-apt-repository -y ppa:mhier/libboost-latest && \
|
||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
autoconf \
|
||||
autoconf-archive \
|
||||
autoconf2.13 \
|
||||
automake \
|
||||
autotools-dev \
|
||||
boost1.68 \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
g++-8 \
|
||||
gcc-8 \
|
||||
git \
|
||||
libbz2-dev \
|
||||
libgflags-dev \
|
||||
libjemalloc-dev \
|
||||
libmagic-dev \
|
||||
libsnappy-dev \
|
||||
libsodium-dev \
|
||||
libssl1.0-dev \
|
||||
libtool \
|
||||
libzstd-dev \
|
||||
openssl \
|
||||
shtool \
|
||||
xz-utils \
|
||||
zlib1g-dev
|
||||
|
||||
RUN \
|
||||
apt-get clean && \
|
||||
apt-get autoremove --purge -y
|
||||
|
||||
ENV ROCKSDB_VERSION=5.16.6
|
||||
|
||||
RUN \
|
||||
mkdir -p /tmpbuild/rocksdb && \
|
||||
cd /tmpbuild/rocksdb && \
|
||||
curl -sL https://github.com/facebook/rocksdb/archive/v${ROCKSDB_VERSION}.tar.gz -o rocksdb-${ROCKSDB_VERSION}.tar.gz && \
|
||||
tar xfvz rocksdb-${ROCKSDB_VERSION}.tar.gz && \
|
||||
cd /tmpbuild/rocksdb/rocksdb-${ROCKSDB_VERSION} && \
|
||||
cmake -H. -Bbuild \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_TESTS=0 \
|
||||
-DWITH_TOOLS=0 \
|
||||
-DUSE_RTTI=1 \
|
||||
-DWITH_JEMALLOC=1 \
|
||||
-DWITH_SNAPPY=1 \
|
||||
-DBUILD_SHARED_LIBS=1 && \
|
||||
cmake --build build --target install && \
|
||||
rm -Rf /tmpbuild/
|
||||
|
||||
RUN mkdir /build
|
||||
|
||||
ENV CXX g++-8
|
||||
ENV CC gcc-8
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
CMD [ "/bin/bash" ]
|
|
@ -1,51 +0,0 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
ENV ROCKSDB_VERSION=5.14.3
|
||||
ENV GFLAGS_VERSION=2.2.1
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y software-properties-common python-software-properties && \
|
||||
add-apt-repository -y ppa:mhier/libboost-latest && \
|
||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
|
||||
apt-get update && \
|
||||
apt-get install -y boost1.67 gcc-6 g++-6 cmake && \
|
||||
apt-get install -y xz-utils build-essential git curl ninja-build \
|
||||
libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev \
|
||||
libsodium-dev libssl-dev openssl \
|
||||
libtool automake autotools-dev libmagic-dev \
|
||||
autoconf autoconf2.13 autoconf-archive shtool
|
||||
|
||||
# Install gflags from source to provide the cmake modules needed by RocksDB.
|
||||
RUN \
|
||||
mkdir -p /tmpbuild/gflags && \
|
||||
cd /tmpbuild/gflags && \
|
||||
curl -L https://github.com/gflags/gflags/archive/v${GFLAGS_VERSION}.tar.gz -o gflags-${GFLAGS_VERSION}.tar.gz && \
|
||||
tar xfvz gflags-${GFLAGS_VERSION}.tar.gz && \
|
||||
cd /tmpbuild/gflags/gflags-${GFLAGS_VERSION} && \
|
||||
cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 && \
|
||||
cmake --build build --target install && \
|
||||
rm -Rf /tmpbuild/
|
||||
|
||||
|
||||
# Install RocksDB from source.
|
||||
RUN \
|
||||
mkdir -p /tmpbuild/rocksdb && \
|
||||
cd /tmpbuild/rocksdb && \
|
||||
curl -L https://github.com/facebook/rocksdb/archive/v${ROCKSDB_VERSION}.tar.gz -o rocksdb-${ROCKSDB_VERSION}.tar.gz && \
|
||||
tar xfvz rocksdb-${ROCKSDB_VERSION}.tar.gz && \
|
||||
cd /tmpbuild/rocksdb/rocksdb-${ROCKSDB_VERSION} && \
|
||||
export CXX=g++-6 CC=gcc-6 && \
|
||||
cmake -H. -Bbuild -GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_TESTS=0 \
|
||||
-DBUILD_SHARED_LIBS=1 \
|
||||
-DUSE_RTTI=1 && \
|
||||
cmake --build build --target install && \
|
||||
rm -Rf /tmpbuild/
|
||||
|
||||
RUN mkdir /build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
CMD [ "/bin/bash" ]
|
Loading…
Reference in a new issue