diff --git a/Dockerfile b/Dockerfile index cc1653c..018e7be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ ARG EXTRASMODULES= ARG ADDPACKAGES= ARG DELPACKAGES= +COPY modules /src/modules + RUN apk add --no-cache gcc g++ make libgcc libstdc++ git \ pkgconfig perl perl-net-ssleay perl-crypt-ssleay perl-lwp-protocol-https \ perl-libwww wget gnutls gnutls-dev gnutls-utils $ADDPACKAGES && \ @@ -19,6 +21,8 @@ RUN apk add --no-cache gcc g++ make libgcc libstdc++ git \ # Clone the requested version git clone https://github.com/inspircd/inspircd.git inspircd -b $VERSION && \ cd /src/inspircd && \ + # Add and overwrite modules + { [ $(ls /src/modules/ | wc -l) -gt 0 ] && cp -r /src/modules/ /src/inspircd/src/modules/ || echo "No modules overwritten/added by repository"; } && \ # write a little script to handle empty extra modules echo -e "if [ \$# -gt 0 ]; then \\n./modulemanager install \$@ \\nfi" > extras.sh && \ /bin/sh extras.sh $EXTRASMODULES && \ diff --git a/README.md b/README.md index d543c34..87c05dd 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,16 @@ Available build arguments: docker build --build-arg "ADDPACKAGES=geoip geoip-dev pcre-dev pcre" --build-arg "CONFIGUREARGS=--enable-extras=m_geoip.cpp --enable-extras=m_regex_pcre.cpp" --build-arg "EXTRASMODULES=m_geoipban" inspircd-docker ``` +## Building additional modules + +In case you want to develop inspircd it is useful to run inspircd with modules which neither exist in core modules nor in extras. + +You can put the sources those modules in the modules directory of this repository. They are automatically copied to the modules directory of inspircd. + +It also allows you to overwrite modules. + +Make sure you install all needed depenencies using `ADDPACKAGES`. + # License View [license information](https://github.com/inspircd/inspircd) for the software contained in this image. diff --git a/modules/.stay b/modules/.stay new file mode 100644 index 0000000..e69de29