Skip to content

Commit

Permalink
docker: Refactor into build matrix. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jevolk committed Mar 31, 2023
1 parent 1b67a12 commit 7929733
Show file tree
Hide file tree
Showing 20 changed files with 381 additions and 330 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM --platform=$TARGETPLATFORM alpine:3.16.1
ARG dist_name alpine
ARG dist_version 3.16

FROM --platform=$TARGETPLATFORM ${dist_name}:${dist_version}

ENV packages="\
boost-chrono \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
ARG acct
ARG repo
ARG dist_name
ARG dist_version
ARG feature
ARG machine

FROM ${acct}/${repo}:alpine-3.16-${feature}-${TARGETARCH}
FROM ${acct}/${repo}:${dist_name}-${dist_version}-${feature}-${machine}

ARG cc
ARG cxx
Expand All @@ -12,6 +15,7 @@ ARG extra_packages_dev2
ARG rocksdb_version 7.4.3
ARG rocksdb_url
ARG ctor_url https://github.com/matrix-construct/construct
ARG machine_spec

ENV CC ${cc}
ENV CXX ${cxx}
Expand All @@ -20,12 +24,12 @@ ENV CONFIG_SHELL bash
ENV rocksdb_version ${rocksdb_version}
ENV rocksdb_url https://codeload.github.com/facebook/rocksdb/tar.gz/refs/tags/v${rocksdb_version}
ENV ctor_url ${ctor_url}
ENV machine_spec ${machine_spec}

ENV packages_dev="\
${packages_dev} \
autoconf \
autoconf-archive \
autoconf2.13 \
automake \
bash \
binutils-gold \
Expand All @@ -50,7 +54,7 @@ RUN true \
&& ln -sv /usr/src/rocksdb construct/deps/rocksdb \
&& cd /usr/src/construct \
&& ./autogen.sh \
&& (./configure --disable-iou || (cat config.log; exit 1)) \
&& (./configure --disable-iou --enable-generic --with-machine="${machine_spec}" || (cat config.log; exit 1)) \
&& make -j `nproc` EXTRA_LDFLAGS="-Wl,--strip-all" install \
&& rm -rf /usr/src/rocksdb \
&& rm -rf /usr/src/construct \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ARG acct
ARG repo
ARG dist_name
ARG dist_version
ARG machine

FROM ${acct}/${repo}:alpine-3.16-base-${TARGETARCH}
FROM ${acct}/${repo}:${dist_name}-${dist_version}-base-${machine}

ENV packages="\
freetype \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
ARG acct
ARG repo
ARG dist_name
ARG dist_version
ARG feature
ARG cc
ARG machine

FROM ${acct}/${repo}:alpine-3.16-${feature}-built-${cc}-${TARGETARCH}
FROM ${acct}/${repo}:${dist_name}-${dist_version}-${feature}-built-${cc}-${machine}

ENV ircd_mods_unload_check=false
WORKDIR /root
Expand Down
Loading

0 comments on commit 7929733

Please sign in to comment.