|
| 1 | +# Buildbot worker for building MariaDB |
| 2 | +# |
| 3 | +# Provides a bintar image based on AlmaLinux with build dependencies |
| 4 | +# and statically compiled libraries |
| 5 | + |
| 6 | +ARG BASE_IMAGE |
| 7 | +FROM "$BASE_IMAGE" AS buildeps |
| 8 | +LABEL maintainer="MariaDB Buildbot maintainers" |
| 9 | + |
| 10 | +# Install updates and required packages |
| 11 | +# hadolint ignore=SC2086 |
| 12 | +RUN dnf -y install 'dnf-command(config-manager)' \ |
| 13 | + && source /etc/os-release \ |
| 14 | + && ARCH=amd64 \ |
| 15 | + && dnf -y --enablerepo=extras install epel-release \ |
| 16 | + && dnf config-manager --set-enabled powertools \ |
| 17 | + && dnf -y module enable mariadb-devel \ |
| 18 | + && dnf -y install almalinux-release-devel \ |
| 19 | + && VERSION_ID=-${VERSION_ID} \ |
| 20 | + && VERSION_ID=${VERSION_ID%%.*} \ |
| 21 | + && dnf config-manager --add-repo https://ci.mariadb.org/galera/mariadb-4.x-latest-gal-${ARCH}-rhel${VERSION_ID}.repo \ |
| 22 | + && dnf -y upgrade \ |
| 23 | + && dnf -y groupinstall "Development Tools" \ |
| 24 | + && dnf -y builddep mariadb-server \ |
| 25 | + && dnf -y install \ |
| 26 | + asio-devel \ |
| 27 | + buildbot-worker \ |
| 28 | + bzip2 \ |
| 29 | + bzip2-devel \ |
| 30 | + ccache \ |
| 31 | + check-devel \ |
| 32 | + cracklib-devel \ |
| 33 | + createrepo \ |
| 34 | + curl-devel \ |
| 35 | + eigen3-devel \ |
| 36 | + flex \ |
| 37 | + galera-4 \ |
| 38 | + gnutls-devel \ |
| 39 | + java-1.8.0-openjdk-devel \ |
| 40 | + java-1.8.0-openjdk \ |
| 41 | + jemalloc-devel \ |
| 42 | + libcurl-devel \ |
| 43 | + libevent-devel \ |
| 44 | + libffi-devel \ |
| 45 | + libpmem-devel \ |
| 46 | + libxml2-devel \ |
| 47 | + libzstd-devel \ |
| 48 | + perl-autodie \ |
| 49 | + perl-Net-SSLeay \ |
| 50 | + python3-devel \ |
| 51 | + readline-devel \ |
| 52 | + rpmlint \ |
| 53 | + ruby \ |
| 54 | + snappy-devel \ |
| 55 | + subversion \ |
| 56 | + unixODBC \ |
| 57 | + unixODBC-devel \ |
| 58 | + wget \ |
| 59 | + which \ |
| 60 | + xz-devel \ |
| 61 | + yum-utils \ |
| 62 | + && dnf clean all \ |
| 63 | + && curl -sL "https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_$(uname -m)" >/usr/local/bin/dumb-init \ |
| 64 | + && chmod +x /usr/local/bin/dumb-init |
| 65 | +ENV WSREP_PROVIDER=/usr/lib64/galera-4/libgalera_smm.so |
| 66 | + |
| 67 | +## Build the static libraries in a separate stage so we save space |
| 68 | +FROM buildeps AS staticlibs |
| 69 | + |
| 70 | +COPY scripts/* /scripts/ |
| 71 | +WORKDIR /scripts |
| 72 | +RUN chmod +x ./*.sh && ls -l |
| 73 | + |
| 74 | +# Build static libraries |
| 75 | +RUN mkdir -p ./local/lib/ \ |
| 76 | + && ./libaio.sh \ |
| 77 | + && ./liblz4.sh \ |
| 78 | + && ./xz.sh \ |
| 79 | + && ./ncurses.sh \ |
| 80 | + && ./libpmem.sh \ |
| 81 | + && ./libzstd.sh \ |
| 82 | + && ./gnutls.sh |
| 83 | + |
| 84 | +FROM buildeps AS bintar |
| 85 | +COPY --from=staticlibs /scripts/local/lib /scripts/local/lib |
| 86 | + |
| 87 | +### Other .Dockerfiles will be concatenated here (worker, qpress, etc) |
| 88 | + |
| 89 | + |
| 90 | + |
0 commit comments