mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
docker: Purge some build packages to slim the built image; refine syntax.
docker: Cleanup for consistent syntax.
This commit is contained in:
parent
432f38cd06
commit
b4cc681112
14 changed files with 237 additions and 165 deletions
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-base
|
||||||
ENV CC clang-10
|
ENV CC clang-10
|
||||||
ENV CXX clang++-10
|
ENV CXX clang++-10
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-10 \
|
||||||
&& apt-get install --no-install-recommends -y clang-10 llvm-10-dev \
|
llvm-10-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-base
|
||||||
ENV CC clang-11
|
ENV CC clang-11
|
||||||
ENV CXX clang++-11
|
ENV CXX clang++-11
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-11 \
|
||||||
&& apt-get install --no-install-recommends -y clang-11 llvm-11-dev \
|
llvm-11-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-base
|
||||||
ENV CC clang-12
|
ENV CC clang-12
|
||||||
ENV CXX clang++-12
|
ENV CXX clang++-12
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-12 \
|
||||||
&& apt-get install --no-install-recommends -y clang-12 llvm-12-dev \
|
llvm-12-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-base
|
||||||
ENV CC clang-13
|
ENV CC clang-13
|
||||||
ENV CXX clang++-13
|
ENV CXX clang++-13
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-13 \
|
||||||
&& apt-get install --no-install-recommends -y clang-13 llvm-13-dev \
|
llvm-13-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-base
|
||||||
ENV CC clang-14
|
ENV CC clang-14
|
||||||
ENV CXX clang++-14
|
ENV CXX clang++-14
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-14 \
|
||||||
&& apt-get install --no-install-recommends -y clang-14 llvm-14-dev \
|
llvm-14-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV CXX g++-10
|
|
||||||
ENV CC gcc-10
|
ENV CC gcc-10
|
||||||
|
ENV CXX g++-10
|
||||||
|
|
||||||
|
ENV packages="\
|
||||||
|
gcc-10 \
|
||||||
|
g++-10 \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y g++-10 gcc-10 \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV CXX g++-11
|
|
||||||
ENV CC gcc-11
|
ENV CC gcc-11
|
||||||
|
ENV CXX g++-11
|
||||||
|
|
||||||
|
ENV packages="\
|
||||||
|
gcc-11 \
|
||||||
|
g++-11 \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y g++-11 gcc-11 \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV CXX g++-12
|
|
||||||
ENV CC gcc-12
|
ENV CC gcc-12
|
||||||
|
ENV CXX g++-12
|
||||||
|
|
||||||
|
ENV packages="\
|
||||||
|
gcc-12 \
|
||||||
|
g++-12 \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y g++-12 gcc-12 \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV CXX g++-8
|
|
||||||
ENV CC gcc-8
|
ENV CC gcc-8
|
||||||
|
ENV CXX g++-8
|
||||||
|
|
||||||
|
ENV packages="\
|
||||||
|
gcc-8 \
|
||||||
|
g++-8 \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y g++-8 gcc-8 \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV CXX g++-9
|
|
||||||
ENV CC gcc-9
|
ENV CC gcc-9
|
||||||
|
ENV CXX g++-9
|
||||||
|
|
||||||
|
ENV packages="\
|
||||||
|
gcc-9 \
|
||||||
|
g++-9 \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y g++-9 gcc-9 \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -2,79 +2,87 @@ FROM ubuntu:22.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
autoconf \
|
||||||
&& apt-get install --no-install-recommends -y \
|
autoconf-archive \
|
||||||
autoconf \
|
autoconf2.13 \
|
||||||
autoconf-archive \
|
automake \
|
||||||
autoconf2.13 \
|
autotools-dev \
|
||||||
automake \
|
build-essential \
|
||||||
autotools-dev \
|
ca-certificates \
|
||||||
build-essential \
|
cmake \
|
||||||
ca-certificates \
|
curl \
|
||||||
cmake \
|
git \
|
||||||
curl \
|
libboost-chrono1.74-dev \
|
||||||
git \
|
libboost-context1.74-dev \
|
||||||
libboost-chrono1.74-dev \
|
libboost-coroutine1.74-dev \
|
||||||
libboost-context1.74-dev \
|
libboost-system1.74-dev \
|
||||||
libboost-coroutine1.74-dev \
|
libboost-thread1.74-dev \
|
||||||
libboost-system1.74-dev \
|
liblz4-dev \
|
||||||
libboost-thread1.74-dev \
|
libnss-db \
|
||||||
liblz4-dev \
|
libmagic-dev \
|
||||||
libnss-db \
|
libsodium-dev \
|
||||||
libmagic-dev \
|
libssl-dev \
|
||||||
libsodium-dev \
|
libtool \
|
||||||
libssl-dev \
|
libzstd-dev \
|
||||||
libtool \
|
shtool \
|
||||||
libzstd-dev \
|
xz-utils \
|
||||||
shtool \
|
"
|
||||||
xz-utils \
|
|
||||||
&& update-ca-certificates \
|
ENV purges="\
|
||||||
&& apt-get clean \
|
cmake \
|
||||||
&& apt-get autoremove --purge -y \
|
curl \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
"
|
||||||
&& true
|
|
||||||
|
ENV rocks_version=6.11.4
|
||||||
|
ENV rocks_cmake="\
|
||||||
|
-DCMAKE_RULE_MESSAGES:BOOL=OFF \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||||
|
-DWITH_JNI=0 \
|
||||||
|
-DWITH_TESTS=0 \
|
||||||
|
-DWITH_BENCHMARK_TOOLS=0 \
|
||||||
|
-DWITH_CORE_TOOLS=0 \
|
||||||
|
-DFAIL_ON_WARNINGS=0 \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DWITH_GFLAGS=0 \
|
||||||
|
-DWITH_LIBURING=0 \
|
||||||
|
-DWITH_LZ4=1 \
|
||||||
|
-DWITH_ZSTD=1 \
|
||||||
|
-DUSE_RTTI=1 \
|
||||||
|
-DBUILD_SHARED_LIBS=1 \
|
||||||
|
"
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages}\
|
||||||
|
&& update-ca-certificates \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& apt-get autoremove --purge -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir /build \
|
||||||
|
&& true
|
||||||
|
|
||||||
ENV ROCKSDB_VERSION=6.11.4
|
|
||||||
ARG skiprocks
|
ARG skiprocks
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& if test -n "$skiprocks"; then \
|
&& if test -n "$skiprocks"; then \
|
||||||
exit 0; \
|
exit 0; \
|
||||||
fi \
|
fi \
|
||||||
&& cd /usr/src \
|
&& cd /usr/src \
|
||||||
&& curl -sL https://codeload.github.com/facebook/rocksdb/tar.gz/refs/tags/v${ROCKSDB_VERSION} -o rocksdb-${ROCKSDB_VERSION}.tar.gz \
|
&& curl -sL https://codeload.github.com/facebook/rocksdb/tar.gz/refs/tags/v${rocks_version} -o rocksdb-${rocks_version}.tar.gz \
|
||||||
&& tar xfvz rocksdb-${ROCKSDB_VERSION}.tar.gz \
|
&& tar xfvz rocksdb-${rocks_version}.tar.gz \
|
||||||
&& rm rocksdb-${ROCKSDB_VERSION}.tar.gz \
|
&& rm rocksdb-${rocks_version}.tar.gz \
|
||||||
&& ln -s /usr/src/rocksdb-${ROCKSDB_VERSION} /usr/src/rocksdb \
|
&& ln -s /usr/src/rocksdb-${rocks_version} /usr/src/rocksdb \
|
||||||
&& cd /usr/src/rocksdb-${ROCKSDB_VERSION} \
|
&& cd /usr/src/rocksdb-${rocks_version} \
|
||||||
&& \
|
&& \
|
||||||
CFLAGS="-g0" \
|
CFLAGS="-g0" \
|
||||||
LDFLAGS="-Wl,--strip-all" \
|
LDFLAGS="-Wl,--strip-all" \
|
||||||
cmake -H. -Bbuild \
|
cmake -H. -Bbuild ${rocks_cmake} \
|
||||||
-DCMAKE_RULE_MESSAGES:BOOL=OFF \
|
&& cmake --build build --target install --parallel `nproc` \
|
||||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
&& rm -rf build \
|
||||||
-DWITH_JNI=0 \
|
&& apt-get purge -y ${purges} \
|
||||||
-DWITH_TESTS=0 \
|
&& apt-get clean \
|
||||||
-DWITH_BENCHMARK_TOOLS=0 \
|
&& apt-get autoremove --purge -y \
|
||||||
-DWITH_CORE_TOOLS=0 \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
-DFAIL_ON_WARNINGS=0 \
|
&& true
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DWITH_GFLAGS=0 \
|
|
||||||
-DWITH_LIBURING=0 \
|
|
||||||
-DWITH_LZ4=1 \
|
|
||||||
-DWITH_ZSTD=1 \
|
|
||||||
-DUSE_RTTI=1 \
|
|
||||||
-DBUILD_SHARED_LIBS=1 \
|
|
||||||
&& cmake --build build --target install \
|
|
||||||
&& rm -rf build \
|
|
||||||
&& apt-get purge -y \
|
|
||||||
cmake \
|
|
||||||
curl \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& apt-get autoremove --purge -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
RUN mkdir /build
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
|
@ -1,18 +1,32 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-full-clang-14
|
FROM jevolk/construct:ubuntu-22.04-full-clang-14
|
||||||
|
|
||||||
|
ENV purges="\
|
||||||
|
autoconf \
|
||||||
|
autoconf-archive \
|
||||||
|
autoconf2.13 \
|
||||||
|
automake \
|
||||||
|
autotools-dev \
|
||||||
|
build-essential \
|
||||||
|
clang-14 \
|
||||||
|
git \
|
||||||
|
libtool \
|
||||||
|
llvm-14-dev \
|
||||||
|
shtool \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& git clone https://github.com/jevolk/charybdis.git \
|
&& git clone https://github.com/jevolk/charybdis.git \
|
||||||
&& cd charybdis \
|
&& cd charybdis \
|
||||||
&& rmdir -v deps/rocksdb \
|
&& rmdir -v deps/rocksdb \
|
||||||
&& ln -sv /usr/src/rocksdb deps \
|
&& ln -sv /usr/src/rocksdb deps \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
&& ./configure \
|
&& ./configure \
|
||||||
&& make -j `nproc` \
|
&& make -j `nproc` \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf charybdis \
|
&& rm -rf charybdis \
|
||||||
&& apt-get purge -y clang-14 llvm-14-dev \
|
&& apt-get purge -y ${purges} \
|
||||||
&& apt-get autoremove --purge -y \
|
&& apt-get autoremove --purge -y \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& true
|
&& true
|
||||||
|
|
|
@ -3,10 +3,14 @@ FROM jevolk/construct:ubuntu-22.04-full
|
||||||
ENV CC clang-14
|
ENV CC clang-14
|
||||||
ENV CXX clang++-14
|
ENV CXX clang++-14
|
||||||
|
|
||||||
RUN true \
|
ENV packages="\
|
||||||
&& apt-get update \
|
clang-14 \
|
||||||
&& apt-get install --no-install-recommends -y clang-14 llvm-14-dev \
|
llvm-14-dev \
|
||||||
&& apt-get clean -y \
|
"
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
|
&& apt-get clean -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& true
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
FROM jevolk/construct:ubuntu-22.04-base
|
FROM jevolk/construct:ubuntu-22.04-base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV packages="\
|
||||||
|
opencl-headers \
|
||||||
|
libgraphicsmagick1-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libjemalloc-dev \
|
||||||
|
libopencl-clang-dev \
|
||||||
|
libpng-dev \
|
||||||
|
"
|
||||||
|
|
||||||
RUN true \
|
RUN true \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y \
|
&& apt-get install --no-install-recommends -y ${packages} \
|
||||||
opencl-headers \
|
&& apt-get clean \
|
||||||
libgraphicsmagick1-dev \
|
&& apt-get autoremove --purge -y \
|
||||||
libicu-dev \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
libjemalloc-dev \
|
&& true
|
||||||
libopencl-clang-dev \
|
|
||||||
libpng-dev \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& apt-get autoremove --purge -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& true
|
|
||||||
|
|
Loading…
Reference in a new issue