diff --git a/Dockerfile b/Dockerfile index 689a3c4..aa97b1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ FROM alpine:3.18 LABEL org.opencontainers.image.authors="Anope Team " ARG VERSION=2.0 -ARG RUN_DEPENDENCIES= -ARG BUILD_DEPENDENCIES= +ARG RUN_DEPENDENCIES="gnutls gnutls-utils mariadb-client mariadb-connector-c sqlite-libs" +ARG BUILD_DEPENDENCIES="gnutls-dev mariadb-dev sqlite-dev" +ARG EXTRA_MODULES="m_mysql m_sqlite m_ssl_gnutls" -RUN apk add --no-cache --virtual .build-utils gcc g++ ninja git cmake gnutls-dev sqlite-dev mariadb-dev $BUILD_DEPENDENCIES && \ - apk add --no-cache --virtual .dependencies libgcc libstdc++ gnutls gnutls-utils sqlite-libs mariadb-client mariadb-connector-c $RUN_DEPENDENCIES && \ +RUN apk add --no-cache --virtual .build-utils gcc g++ ninja git cmake $BUILD_DEPENDENCIES && \ + apk add --no-cache --virtual .dependencies libgcc libstdc++ $RUN_DEPENDENCIES && \ # Create a user to run anope later adduser -u 10000 -h /anope/ -D -S anope && \ mkdir -p /src && \ @@ -16,9 +17,7 @@ RUN apk add --no-cache --virtual .build-utils gcc g++ ninja git cmake gnutls-dev git clone --depth 1 https://github.com/anope/anope.git anope -b $VERSION && \ cd /src/anope && \ # Add and overwrite modules - ln -s /src/anope/modules/extra/m_ssl_gnutls.cpp modules && \ - ln -s /src/anope/modules/extra/m_mysql.cpp modules && \ - ln -s /src/anope/modules/extra/m_sqlite.cpp modules && \ + for module in $EXTRA_MODULES; do ln -s /src/anope/modules/extra/$module.cpp modules; done && \ mkdir build && \ cd /src/anope/build && \ cmake -DINSTDIR=/anope/ -DDEFUMASK=077 -DCMAKE_BUILD_TYPE=RELEASE -GNinja .. && \