-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow customising the extra modules that the container is built with.
- Loading branch information
Showing
1 changed file
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,12 @@ FROM alpine:3.18 | |
LABEL org.opencontainers.image.authors="Anope Team <[email protected]>" | ||
|
||
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 .. && \ | ||
|