Skip to content

Commit

Permalink
Allow to install non extras modules to the container
Browse files Browse the repository at this point in the history
  • Loading branch information
SISheogorath committed Jan 28, 2017
1 parent 1ebf556 commit c005394
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 && \
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Empty file added modules/.stay
Empty file.

0 comments on commit c005394

Please sign in to comment.