0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 16:52:44 +01:00

Merge pull request #8 from weebl2000/DRY-docker

Thanks @weebl2000 !!!
This commit is contained in:
Jason Volk 2020-04-08 11:39:07 -07:00 committed by GitHub
commit 06e0c5cbbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 69 deletions

View file

@ -0,0 +1,12 @@
#!/bin/sh
BASEDIR=$(dirname "$0")
docker pull ubuntu:18.04
docker build -t jevolk/construct:ubuntu-18.04 $BASEDIR/ubuntu/base
docker build -t jevolk/construct:ubuntu-18.04-clang-9 $BASEDIR/ubuntu/clang-9
docker build -t jevolk/construct:ubuntu-18.04-gcc-8 $BASEDIR/ubuntu/gcc-8
docker build -t jevolk/construct:ubuntu-18.04-gcc-9 $BASEDIR/ubuntu/gcc-9
docker push jevolk/construct:ubuntu-18.04-clang-9
docker push jevolk/construct:ubuntu-18.04-gcc-8
docker push jevolk/construct:ubuntu-18.04-gcc-9

View file

@ -1,62 +0,0 @@
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 --no-install-recommends -y \
autoconf \
autoconf-archive \
autoconf2.13 \
automake \
autotools-dev \
boost1.68 \
build-essential \
cmake \
curl \
g++-8 \
gcc-8 \
git \
libbz2-dev \
libgflags-dev \
libgraphicsmagick1-dev \
libjemalloc-dev \
liblz4-dev \
libmagic-dev \
libnss-db \
libsodium-dev \
libssl-dev \
libtool \
shtool \
xz-utils && \
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_LZ4=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" ]

View file

@ -1,8 +1,10 @@
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
apt-get install -y software-properties-common && \
apt-get install --no-install-recommends -y software-properties-common && \
add-apt-repository -y ppa:mhier/libboost-latest && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
@ -14,7 +16,6 @@ RUN \
autotools-dev \
boost1.68 \
build-essential \
clang-9 \
cmake \
curl \
git \
@ -30,8 +31,10 @@ RUN \
libtool \
shtool \
xz-utils && \
apt-get purge -y software-properties-common && \
apt-get clean && \
apt-get autoremove --purge -y
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
ENV ROCKSDB_VERSION=5.16.6
@ -53,9 +56,5 @@ RUN \
RUN mkdir /build
ENV CC clang-9
ENV CXX clang++-9
WORKDIR /build
CMD [ "/bin/bash" ]

View file

@ -0,0 +1,10 @@
FROM jevolk/construct:ubuntu-18.04
ENV CC clang-9
ENV CXX clang++-9
RUN apt-get update \
&& apt-get install --no-install-recommends -y clang-9 \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

View file

@ -0,0 +1,9 @@
FROM jevolk/construct:ubuntu-18.04
ENV CXX g++-8
ENV CC gcc-8
RUN apt-get update \
&& apt-get install --no-install-recommends -y g++-8 gcc-8 \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

View file

@ -0,0 +1,12 @@
FROM jevolk/construct:ubuntu-18.04
ENV CXX g++-9
ENV CC gcc-9
RUN apt-get update \
&& apt-get install --no-install-recommends -y software-properties-common \
&& add-apt-repository ppa:jonathonf/gcc-9.2 \
&& apt-get update \
&& apt-get install --no-install-recommends -y g++- gcc-9 \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*