Coder Social home page Coder Social logo

inspircd / inspircd-docker Goto Github PK

View Code? Open in Web Editor NEW
107.0 8.0 41.0 285 KB

InspIRCd Docker Image

Home Page: https://hub.docker.com/r/inspircd/inspircd-docker

License: MIT License

Shell 95.51% Dockerfile 4.49%
inspircd docker irc ircd irc-server docker-image

inspircd-docker's Introduction

InspIRCd

InspIRCd is a modular Internet Relay Chat (IRC) server written in C++ for Linux, BSD, Windows and Mac OS X systems which was created from scratch to be stable, modern and lightweight.

InspIRCd is one of only a few IRC servers to provide a tunable number of features through the use of an advanced but well-documented module system. By keeping core functionality to a minimum we hope to increase the stability, security, and speed of InspIRCd while also making it customizable to the needs of many different users.

Bootstrapping

The easiest way to run this image is using our bootstrap script.

To use it run the following statement:

wget -qO- https://raw.githubusercontent.com/inspircd/inspircd-docker/master/bootstrap.sh | sh

The bootstrap script takes care of the fact that docker is installed and runs the image.

If port 6697 or 6667 are already in use another random port is used. Otherwise, those ports are allocated by the container.

How to use this image

First, a simple run command:

$ docker run --name ircd -p 6667:6667 inspircd/inspircd-docker

This will start an InspIRCd instance listening on the default IRC port 6667 on the container.

You should then be able to connect using your favourite client.

To include your configuration into the container use:

$ docker run --name inspircd -p 6667:6667 -v /path/to/your/config:/inspircd/conf/ inspircd/inspircd-docker

Notice: In case you provide an empty directory make sure it's owned by UID 10000. Use chown 10000 directory to correct permissions

Default ports of this container image:

Port Configuration
6667 clients, plaintext
6697 clients, TLS
7000 server, plaintext
7001 server, TLS

Generated configuration

Instead of including your own configuration files, this container allows you to manipulate a few options of the default configuration by environment variables.

Use the following environment variables to configure your container:

Available variables Default value Description
INSP_NET_SUFFIX .example.com Suffix used behind the server name
INSP_NET_NAME Omega Name advertised as network name
INSP_SERVER_NAME Container ID + INSP_NET_SUFFIX Full container name. Has to be an FQDN
INSP_ADMIN_NAME Jonny English Name showed by the /admin command
INSP_ADMIN_NICK MI5 Nick showed by the /admin command
INSP_ADMIN_EMAIL [email protected] E-mail shown by the /admin command
INSP_ENABLE_DNSBL yes Set to no to disable DNSBLs
INSP_CONNECT_PASSWORD no default Password either as plaintext, or hash value
INSP_CONNECT_HASH no default Hashing algorithm for INSP_CONNECT_PASSWORD

A quick example how to use the environment variables:

$ docker run --name inspircd -p 6667:6667 -e "INSP_NET_NAME=MyExampleNet" inspircd/inspircd-docker

Initial setup issues

If you have issues with registration timeouts when connecting to a fresh installation, you may have DNS issues. By default, when a user connects to the IRC server, the user's IP is checked against DNS blacklists. In some cases this check can fail.

To see if you're affected by this particular issue, try disabling DNS Blacklists, e.g.

$ docker run --name inspircd -p 6667:6667 -e "INSP_ENABLE_DNSBL=no" inspircd/inspircd-docker

If you can connect with INSP_ENABLE_DNSBL=no, try adding a DNS configuration to your inspircd.conf file to point to a DNS server you trust. See the DNS docs for details.

Password authentication

You can either set a plaintext password or a hashed password. If you leave INSP_CONNECT_HASH unset, the password will be used as a plaintext password.

To use connect password s3cret stored in plaintext:

$ docker run --name inspircd -p 6667:6667 -e "INSP_CONNECT_PASSWORD=s3cret" inspircd/inspircd-docker

To use connect password s3cret stored with hmac-sha256:

$ docker run --name inspircd -p 6667:6667 -e "INSP_CONNECT_HASH=hmac-sha256" -e "INSP_CONNECT_PASSWORD=mlknZfDb\$C5E0lXKxdoHFxmsJEfSNe8Ct4XG25slv2WiJvUnnWew" inspircd/inspircd-docker

Make sure you escape special chars like $ or & if needed. If you are using docker-compose you might need to double escape and use double-dollar signs

Oper

We provide two possibly ways to define a default oper for the server.

If neither INSP_OPER_PASSWORD_HASH, nor INSP_OPER_FINGERPRINT is configured, no oper will be provided to keep your server secure.

Further details see official opers.conf docs.

Password authentication

A normal password authentication uses /oper <opername> <password> (everything case sensitive)

To generate a password hash connect to the network and use /mkpasswd <hash-type> <password>.

Available variables Default value Description
INSP_OPER_NAME oper Oper name
INSP_OPER_PASSWORD_HASH no default Hash value for your oper password hash
INSP_OPER_HOST *@* Hosts allowed to oper up
INSP_OPER_HASH hmac-sha256 Hashing algorithm for INSP_OPER_PASSWORD
INSP_OPER_SSLONLY yes Allow oper up only while using TLS
INSP_OPER_PASSWORD no default (deprecated) Alias INSP_OPER_PASSWORD_HASH

For example to oper up with /oper oper s3cret you would run the following line:

$ docker run --name inspircd -p 6667:6667 -p 6697:6697 -e "INSP_OPER_PASSWORD_HASH=cNkbWRWn\$MhSTITMbrCxp0neoDqL66/MSI2C+oxIa4Ux6DXb5R4Q" inspircd/inspircd-docker

Make sure you escape special chars like $ or & if needed

Client certificate authentication

This way only works using TLS connection and uses a client certificate for authentication.

Provide the SHA256 fingerprint of the certificate as INSP_OPER_FINGERPRINT to configure it.

Available variables Default value Description
INSP_OPER_NAME oper Oper name for usage with /oper
INSP_OPER_FINGERPRINT no default Oper TLS fingerprint (SHA256)
INSP_OPER_AUTOLOGIN yes Automatic login of with TLS fingerprint

Linking servers and services

Links

With this container you can link other servers. To do so you have to define a few environment variables.

Currently we allow 3 links per container. Those link variables are INSP_LINK1_*, INSP_LINK2_*, and INSP_LINK3_*.

We only list the possible options once, but they work for INSP_LINK1_*, as well as for INSP_LINK2_* and INSP_LINK3_*.

Available variables Default value Description
INSP_LINK1_NAME no default Name of the remote server (INSP_SERVER_NAME)
INSP_LINK1_IPADDR no default IP or hostname of the remote server
INSP_LINK1_PORT 7001 (TLS) or 7000 Port used to connect the remote server
INSP_LINK1_SENDPASS no default Password send by this server
INSP_LINK1_RECVPASS no default Password send by remote server
INSP_LINK1_PASSWORD no default Alias for sendpass and recvpass
INSP_LINK1_ALLOWMASK first container subnet CIDR of remote server's IP address
INSP_LINK1_TLS_ON yes Turn on TLS encryption for the link
INSP_LINK1_FINGERPRINT no default TLS Fingerprint of the remote server (SHA256)
INSP_LINK1_OPTIONS no default Allows additional to set options to <link>
INSP_LINK1_AUTOCONNECT yes Enables <autoconnect> for this link

Services

This image allows you to configure services link blocks by environment variables.

This way you can easily connect Anope or Atheme to your InspIRCd container.

Available variables Default value Description
INSP_SERVICES_NAME services + INSP_NET_SUFFIX Name of the services host
INSP_SERVICES_IPADDR services IP or hostname of services
INSP_SERVICES_ALLOWMASK first container subnet CIDR of services source IP
INSP_SERVICES_HIDDEN no Hide services from /MAP and /LINKS
INSP_SERVICES_SENDPASS no default Password send by this server
INSP_SERVICES_RECVPASS no default Password send by the services
INSP_SERVICES_PASSWORD no default Alias for sendpass and recvpass
INSP_SERVICES_TLS_ON no Turn on TLS encryption for the services link
INSP_SERVICES_OPTIONS no default Allows additional to set options to <link>

If you want to link services.example.com for example, you have to specify at least the INSP_SERVICES_PASSWORD:

$ docker run --name inspircd -p 6667:6667 -p 6697:6697 -e "INSP_SERVICES_PASSWORD=somesecretpassword" inspircd/inspircd-docker

Make sure you run the services and InspIRCd container on the same docker network or specify the correct INSP_SERVICES_ALLOWMASK

TLS

Using self-generated certificates

This container image generates a self-signed TLS certificate on start-up as long as none exists. To use this container with TLS enabled:

$ docker run --name inspircd -p 6667:6667 -p 6697:6697 inspircd/inspircd-docker

You can customize the self-signed TLS certificate using the following environment variables:

Available variables Default value Description
INSP_TLS_CN irc.example.com Common name of the certificate
INSP_TLS_MAIL [email protected] Mail address represented in the certificate
INSP_TLS_UNIT Server Admins Unit responsible for the service
INSP_TLS_ORG Example IRC Network Organisation name
INSP_TLS_LOC Example City City name
INSP_TLS_STATE Example State State name
INSP_TLS_COUNTRY XZ Country Code by ISO 3166-1
INSP_TLS_DURATION 365 Duration until the certificate expires

This will generate a self-signed certificate for irc.example.org instead of irc.example.com:

$ docker run --name inspircd -p 6667:6667 -p 6697:6697 -e "INSP_TLS_CN=irc.example.org" inspircd/inspircd-docker

Using secrets

We provide the ability to use secrets with this image to place a certificate to your nodes.

Docker version 1.13 is required and secrets are only supported in swarm mode

docker secret create irc.key /path/to/your/ircd.key
docker secret create inspircd.crt /path/to/your/ircd.crt

docker service create --name inspircd --secret source=irc.key,target=inspircd.key,mode=0400 --secret inspircd.crt inspircd/inspircd-docker

Notice the syntax --secret source=irc.key,target=inspircd.key allows you to name a secret in a way you like.

Currently used secrets:

  • inspircd.key
  • inspircd.crt

Generic configuration includes

To extend the default configuration you can use /inspircd/conf.d/.

All .conf-files placed there, by mounting or extending the image, are automatically included.

$ docker run --name inspircd -p 6667:6667 -v /path/to/your/configs:/inspircd/conf.d/ inspircd/inspircd-docker

You have to take care about possible conflicts with the existing configuration. If you want a full custom configuration, copy or mount it to /inspircd/conf/ instead of /inspircd/conf.d/.

Using secrets

Additional to the conf.d/ directory we offer a automated includes for all .conf files that are mounted as secrets.

For example to add your own oper configuration.

docker secret create secret-opers /path/to/your/opers.conf

docker service create --name inspircd --secret secret-opers inspircd/inspircd-docker

Build extras

To build extra modules you can use the --build-arg statement.

Available build arguments:

Argument Description
VERSION Version of InspIRCd. Uses -b-parameter from git clone
CONFIGUREARGS Additional parameters. Used to enable core extras like m_geo_maxmind
EXTRASMODULES Additional modules from inspircd-contrib repository like m_geocmd
BUILD_DEPENDENCIES Additional packages which are only needed during compilation
RUN_DEPENDENCIES Additional packages which are needed to run InspIRCd
docker build --build-arg "BUILD_DEPENDENCIES=libmaxminddb-dev pcre-dev" --build-arg "RUN_DEPENDENCIES=libmaxminddb pcre" --build-arg "CONFIGUREARGS=--enable-extras m_geo_maxmind --enable-extras m_regex_pcre"  --build-arg "EXTRASMODULES=m_geocmd" --build-arg "VERSION=v1.2.3" inspircd-docker

Building additional modules

In case you want to develop InspIRCd modules, it is useful to run InspIRCd with modules which neither exist in core modules nor in extras.

You can put the sources these 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 dependencies using ADDPACKAGES.

Updates and updating

To update your setup simply pull the newest image version from docker hub and run it.

docker pull inspircd/inspircd-docker

We automatically build our images weekly to include the current state of modern libraries.

Considering to update your docker setup regularly.

Hint: Check the "Breaking changes"-section when you notice problems.

Deprecated features

We provide information about features we remove in future.

  • INSP_OPER_PASSWORD - was replaced by INSP_OPER_PASSWORD_HASH as more descriptive name

Breaking changes

We document changes that possibly broken your setup and are no longer supported. Hopefully, we can provide useful information for debugging.

  • 046bb02 Update to InspIRCd 3.0 requires some config changes. If you run InspIRCd using docker-compose or by mounting a volume, make sure you update your config according to the docs page.

  • cdba94f ADDPACKAGES and DELPACKAGES are replaced by BUILD_DEPENDENCIES and RUN_DEPENDENCIES

Additional information

By default this image ships DNSBL settings for DroneBL and EFnet RBL.

This should provide a basic protection for your server, but also causes problems if you want to use Tor or open proxies.

Set INSP_ENABLE_DNSBL to no to disable them.

License

View license information for the software contained in this image.

Supported Docker versions

This image is officially supported on Docker version 17.06.0-CE.

Support for older versions (down to 1.12) is provided on a best-effort basis.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

You can also reach many of the project maintainers via the #inspircd IRC channel on Chatspike.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests and do our best to process them as fast as we can.

inspircd-docker's People

Contributors

adam- avatar ashkitten avatar dependabot[bot] avatar geektoor avatar humorbaby avatar kaitlinsm avatar kjelle avatar ping86 avatar r734 avatar sadiecat avatar sisheogorath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inspircd-docker's Issues

Unable to load m_mysql.so

After loading all the modules, this error shows:
Unable to load m_mysql.so: /inspircd/modules/m_mysql.so is not a module (no ABI symbol)

I'm trying to connect a database to my inspIRCd servers and I'm not able.
I downloaded the dependencies and configured it in the dockerfile.
RUN ./configure --enable-extras m_mysql.cpp
RUN apk add --no-cache mariadb-dev

After the error, the image closes.

conf/*.sh files are (unnecessarily?) tricky to override

I'm super happy with inspircd-docker. It's allowed me to get an IRC server running locally really quickly. I'm not super familiar with Docker, but I was able to trivially update some conf/*.conf files so that I could have a lot more local connections while I develop my software.

However, when I wanted an oper to be able to use the sajoin command I edited conf/opers.sh and that didn't work. I wasn't too surprise, because there was a warning in that file about not editing it after a build. After (way too much?) futzing around, I think I understand what is happening, but I can't tell if it's a deliberate design decision or just the fallout of incremental development.

AFAICT (and I may be wrong), because conf/inspircd.conf has lines like:

<include executable="conf/opers.sh">

that pulls opers.sh in from a directory that is not overwritten when people use the -v option of docker to create a bind mount. However, the *.conf files are overwritten.

Locally I've created a consistent_configuration branch that uses inspircd/conf instead of conf, e.g.,

<include executable="inspircd/conf/opers.sh">

and it works for me. However, I do not know why the code is the way it is and it's quite possible that my branch is worse for other use cases. However, if my upcoming PR is inappropriate, then it may be worth adding a little to README.md to explain the dichotomy between the .conf and the .sh files.

Specify only partial config

Is it possible to use the default inspircd.conf file but then also load a custom config which specifes only a few settings (e.g. opers, permanent channels..) without the inspircd.conf file being present when the container first starts?

I've tried with an arbitrary file in the /conf directory but it isn't loaded. I've also tried with an existing file (opers.conf) but it is overwritten on first run.

Example: /ircd/conf/site.conf contains:
<permchannels channel="#help" modes="nt" topic="Help.">

Then run:
docker run -d -p 6667:6667 -v /ircd/conf/:/inspircd/conf/ inspircd/inspircd-docker

CVE-2019-14697

I scanned the docker image with Salus and it has CVE report. Can you please update musl 1.1.20-~ to 1.1.20-r5 in docker image?

Custom Opers

Hey,

the docker image provides only variables to define one single oper who can do simply anything.
As far as i see, there is no way to customize this, unless fiddling arround in the opers.sh where in the comment it says cleary you should not do.

Is there a way to define multible and in generell more flexible Opers that i don't see?

Thanks

Andy

conf/*.sh don't execute correctly if bind mount is mounted on a filesystem with no exec

Best practice with docker is to bind mount config files into docker and have the filesystem prevent any execution on the bind mounts. This is done via setting no exec on the parent mount. This prevents execution escapes from the containers to the parent host.

inspircd uses shell scripts as part of the configuration language. This breaks on no exec mounts, however if the execution is run via sh /path/to/config.sh, this works just fine on no exec mounts. Would this be a accepted patch?

Improvements in config handling

Currently we only include a default config and allow to mount configs to /inspircd/conf/.

We should think about change this way. Providing a working config by default is important but we should may allow modify the configs by environment variables.

Using an entrypoint script is the common way to do this.

The question is what is the best way to do that? What are the options we want to make them configurable?

  • servername, Description, etc.
  • oper credentials
  • 3 linked server
  • services
  • custom config.d directory

HTTP/1.1 400 Bad Request

Hello there.
I try to set up my own irc server but I am getting all the time the following error on connection

Irssi: Connection lost to irc.amiga.gr
18:00 -!- Irssi: Removed reconnection to server irc.amiga.gr port 6667
18:00 -!- Irssi: Looking up irc.amiga.gr
18:00 -!- Irssi: Reconnecting to irc.amiga.gr [95.217.15.210] port 6667 - use /RMRECONNS to abort
18:00 -!- Irssi: Connection to irc.amiga.gr established
18:00 -!- HTTP/1.1 400 Bad Request
18:00 -!- Content-Type: text/plain; charset=utf-8
18:00 -!- Connection: close
18:00 -!- Request
18:00 -!- Irssi: Connection lost to irc.amiga.gr

The log file gives me the following

Wed Jan 27 2021 17:51:31 core_dns: qdcount: 1 ancount: 1 nscount: 0 arcount: 0
Wed Jan 27 2021 17:51:31 core_dns: Unpack name 1.0.0.127.in-addr.arpa
Wed Jan 27 2021 17:51:31 core_dns: Unpack name 1.0.0.127.in-addr.arpa
Wed Jan 27 2021 17:51:31 core_dns: Unpack name localhost
Wed Jan 27 2021 17:51:31 core_dns: Invalid name
Wed Jan 27 2021 17:51:32 SOCKET: Accepting connection on socket [::]:6667 fd 10
Wed Jan 27 2021 17:51:32 USERS: New UUID for user: 69FAAAABK
Wed Jan 27 2021 17:51:32 USERS: New user fd: 10
Wed Jan 27 2021 17:51:32 SOCKET: New file descriptor: 10
Wed Jan 27 2021 17:51:32 core_dns: Processing request to lookup 127.0.0.1 of type 12 to 127.0.0.11
Wed Jan 27 2021 17:51:32 core_dns: Packing name 1.0.0.127.in-addr.arpa
Wed Jan 27 2021 17:51:32 core_dns: cache: Checking cache for 1.0.0.127.in-addr.arpa
Wed Jan 27 2021 17:51:32 SOCKET: Error on FD 10 - 'Connection closed'
Wed Jan 27 2021 17:51:32 USERS: QuitUser: 69FAAAABK=69FAAAABK 'Connection closed'
Wed Jan 27 2021 17:51:32 SOCKET: DoWrite on errored or closed socket
Wed Jan 27 2021 17:51:32 SOCKET: Remove file descriptor: 10
Wed Jan 27 2021 17:51:32 CULLLIST: Deleting @0x555560f8c3c0

I am not sure how to get more info on why this HTTP/1.1 400 Bad Request occurs and how exactly to proceed.
Can you please recommend what to check and how to proceed?
Also, I use traefik in front of the inspircd docker server.

Log file is missing

Hi,

In my inspircd.conf I have defined line for logs:

<log method="file" type="*" level="debug" target="logs/ircd.log">

but file is not generated, logs from docker are empty too.
Where is the problem? It's an original line where I changed only type to clear *.

Module passforward is enabled by default

Hello.
Is there a reason for why passforward is enabled by default? I have network(s) without any services..
Could it be enabled by default, but configurable to disable it?

bootstrap.sh exposing same port twice

Check for available ports

if [ "$(netstat -ln | grep -c :6667)" -eq 0 ]; then
RUNPARAM="$RUNPARAM -p 6667:6667"
else
RUNPARAM="$RUNPARAM -p 6667"
echo "exposing 6667 on random port. Check 'docker ps' for details"
fi

if [ "$(netstat -ln | grep -c :6697)" -eq 0 ]; then
RUNPARAM="$RUNPARAM -p 6697:6697"
else
RUNPARAM="$RUNPARAM -p 6697"
echo "exposing 6697 on random port. Check 'docker ps' for details"
fi

[Question] How to enable ldap properly?

I've tried using following command to build an image

sudo docker build --build-arg "CONFIGUREARGS=--enable-extras=m_ldap.cpp" --build-arg "VERSION=v3.4.0" --build-arg "BUILD_DEPENDENCIES=openldap" inspircd-docker

But I got this

	BUILD:		modules/m_ldap.cpp
/inspircd-src/src/modules/m_ldap.cpp:36:10: fatal error: ldap.h: No such file or directory
 #include <ldap.h>
          ^~~~~~~~
compilation terminated.
make[1]: *** [real.mk:594: modules/m_ldap.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [GNUmakefile:162: target] Error 2
The command '/bin/sh -c make -j`getconf _NPROCESSORS_ONLN` install' returned a non-zero code: 2

Add license

In order to make it easy and usable for people we should add a license statement to the README.

I'll leave it to you @Adam- which license we want to use. I guess MIT isn't wrong GPL is also an option.

Bootstrap script fails on CentOS

The Bootstrap script fails on a fresh CentOS 7 instance.

Reason: After docker is installed the docker daemon isn't started automatically.

Resolution: run systemctl start docker and then use the bootstrap script again.

Troubleshooting Linking 2 servers

I'm trying to figure out

Running the command:
docker exec *container-id* /conf/links.sh
doesn't output anything..

The haproxy is working perfectly between the 2 servers but when I connect two clients (one to each server), they are in two separate servers instead of one linked between the two.
What am I doing wrong?

`

version: "3.7"
services:

haproxy:
image: haproxy:alpine
volumes:
- ./haproxy/:/usr/local/etc/haproxy/
depends_on:
- inspircd1
- inspircd2
ports:
- "6667:6667"
networks:
- backend

inspircd1:
image: inspircd/inspircd-docker
volumes:
- ./server1/conf/:/inspircd/conf/
environment:
INSP_NET_NAME: inspircd1
INSP_SERVER_NAME: inspircd1.local
INSP_NET_SUFFIX: .local

  INSP_LINK1_NAME: inspircd2.local
  INSP_LINK1_IPADDR: inspircd2
  INSP_LINK1_SENDPASS: password
  INSP_LINK1_RECVPASS: password
  INSP_LINK1_TLS_ON: "no"
ports:
  - "6667" #client
  - "7000" #server
networks:
  - backend
   # aliases:
   #   - inspircd1.local

inspircd2:
image: inspircd/inspircd-docker
volumes:
- ./server2/conf/:/inspircd/conf/
environment:
INSP_NET_NAME: inspircd2
INSP_SERVER_NAME: inspircd2.local
INSP_NET_SUFFIX: .local

  INSP_LINK2_NAME: inspircd1.local
  INSP_LINK2_IPADDR: inspircd1
  INSP_LINK2_SENDPASS: password
  INSP_LINK2_RECVPASS: password
  INSP_LINK2_TLS_ON: "no"
ports:
  - "6667"
  - "7000"
networks:
  - backend

networks:
backend:
`

Providing stable releases as image

We should provide stable releases of InspIRCd to Docker Hub which makes it easier for people to stay up-to-date and have verified releases.

Because Docker Hub doesn't support --build-arg parameter passed to the build process we should use separated branches which just change the defaults of the argument. This brings some ugly side effects but right now I see no other solution. Maybe something like release branches.

release/v2.0.24 -> changed the VERSION argument to v2.0.24 instead of insp20 and provides a tag 2.0.24 which will result in a nice automated build.

Mhm, after writing it down it doesn't look as ugly as I thought.

Maybe it's a nice solution. Opinions?

Related to #52

Update for 3.0

The current build only supports 2.x, but 3.0 was released recently and should be dockerized. I'm not very familiar with the intricacies of Inspircd and Docker, but I'll try to get at least a start on it and see if I can find some of the gotchas.

How to override with conf.d?

Super easy to start the server and everything works, however I'd like to customize some settings, e.g. I don't want to block local apps while I'm developing and testing my code. I'm trying to figure out what I should put under conf.d folder...

Here's how I start the server:

docker run -it --rm --name inspircd -p 6667:6667 -v ./inspircd:/inspircd/conf.d/ inspircd/inspircd-docker

and under "inspircd" dir I added an overrides.conf file that looks like this:

<connect
    # name: Name to use for this connect block. Mainly used for
    # connect class inheriting.
    name="main2"
    
    # allow: The IP address or hostname of clients that can use this
    # class. You can specify either an exact match, a glob match, or
    # a CIDR range here.
    allow="*"
    
    # password: Password to use for this block/user(s)
    password="foobar"
         
    maxchans="200"
    localmax="300"
    globalmax="300"
    resolvehostnames="no"
    modes="+x">

I have no idea why I can't override "main" settings, I get an error, so I created "main2". Is that the right approach?
Does the file content make sense?

I'm testing the password "foobar" but the config doesn't seem to work, e.g. clients can sign in without a password or with any incorrect password.

inspircd 3 stuck exits due to incorrect paths

Looks like the latest Docker Hub image has an inspiricd.conf file pointing to the wrong location for files:
Could not read "/inspircd/conf/conf/docker.motd" for "motd" file at /inspircd/conf/inspircd.conf:180:71 (inside tag files at line 180)

Could not read "/inspircd/conf/conf/modules.conf" for include at /inspircd/conf/inspircd.conf:551:34 (inside tag include at line 551)
I tried editing it line by line, but I just reverted to version 2.0.27 and that version is working now.

Healthcheck interval makes for a lot of noise

After firing up the docker image, I noticed there is a lot of noise related to doing dns resolution on 127.0.0.1.

I figured out it was due to the health check , running every 1 second.

Might be worthwhile to either a) give it a configurable interval or b) have facilities to quell the noise for the health-check specifically.

Building with mysql module

I have the following configuration and have a issue.

FROM alpine:3.9 as builder

LABEL maintainer1="Adam <[email protected]>" \
     maintainer2="Sheogorath <[email protected]>"

ARG VERSION=v3.3.0
ARG CONFIGUREARGS="--enable-extras=m_mysql.cpp"
ARG EXTRASMODULES="m_rotatelog"
ARG BUILD_DEPENDENCIES=""
ARG RUN_DEPENDENCIES="libmariadb"

Error:

Finished!
Removing intermediate container bbc3edc2d80a
 ---> 2e0577d24989
Step 17/29 : RUN ./configure $CONFIGUREARGS --prefix /inspircd --uid 10000 --gid 10000
 ---> Running in 2c5415bdcd16
Enabling m_mysql.cpp ... 
m_geo_maxmind.cpp     = disabled
m_ldap.cpp            = disabled
m_mysql.cpp           = enabled
m_pgsql.cpp           = disabled
m_regex_pcre.cpp      = disabled
m_regex_posix.cpp     = disabled
m_regex_re2.cpp       = disabled
m_regex_stdlib.cpp    = disabled
m_regex_tre.cpp       = disabled
m_sqlite3.cpp         = disabled
m_ssl_gnutls.cpp      = disabled
m_ssl_mbedtls.cpp     = disabled
m_ssl_openssl.cpp     = disabled
m_sslrehashsignal.cpp = disabled
Remember: YOU are responsible for making sure any libraries needed have been installed!
Removing intermediate container 2c5415bdcd16
 ---> bf53dfa45d96
Step 18/29 : RUN make -j`getconf _NPROCESSORS_ONLN` install
 ---> Running in 0f3f17799cb0
make: *** No rule to make target 'install'.  Stop.
ERROR: Service 'irc' failed to build: The command '/bin/sh -c make -j`getconf _NPROCESSORS_ONLN` install' returned a non-zero code: 2

How can I solve this issue?

Thanks.

Delay in delivery of messages

Hi,
I am looking for an IRC-based solution that will replace online chat that will be able to support several dozen thousand people at the same time. I tried with different options but still, 4-5 messages arrive immediately and the rest are delayed.
Below is my current config, something else I should change to get this effect?
https://pastebin.com/WPV59UjM

Cannot create oper/connect password.

when doing docker run -d --rm inspircd/inspircd-docker /mkpass hmac-sha256 password

will yield a different result each time the command is ran,

adding the following as an environmental variable
INSP_OPER_PASSWORD_HASH=5c261b5ea08e0628d82e759ebeeb14d55b12cffb81d38505db8507deab38597f

does not help when doing /oper oper "password"

Oper login issue

I tried to configure the oper for my inspircd server except it keeps on stating that the fields login, password and hosts did not match. This happens when using the default opers.conf.example (renamed to opers.conf and moved to /conf) as well including the load of the module in my inspircd.conf and with the docker run comment with the variables:

Docker run command:

docker run -d
--name inspircd
--memory=128M
--memory-swap=256M
-p 6697:6697
-p 7001:7001
-e INSP_OPER_NAME=test
-e INSP_OPER_PASSWORD=test
-e INSP_OPER_HOST=@
-e INSP_OPER_HASH=hmac-sha256
-e INSP_OPER_SSONLY=yes
-v /volume4/Drive4/Apps/inspircd:/inspircd/conf/
inspircd/inspircd-docker

Noticed I used old conf files as well so did remove everything and let inspircd create everything automatic again and same issue exist but this time it only says that the password doesn't match

/mkpasswd - Unknown command: mkpasswd

This might just be a question rather than an issue. Once I run this image in a container and connect to the server the following command is not recognized:

command: /mkpasswd hmac-sha256 somePass
output: Irssi: Unknown command: mkpasswd

I see that the appropriate modules appear to be loaded correctly.

irc_1  | 
irc_1  | InspIRCd Process ID: 1
irc_1  | 
irc_1  | Loading core modules ....................
irc_1  | [*] Loading module:    m_md5.so
irc_1  | [*] Loading module:    m_sha256.so

Am I missing something? Thanks! Sweet Image.

Health-Check Potentially Causing container to silently exit

Full disclosure: I built the image for armhf.

With that said, after getting the container working on my platform (building it using docker build seems to work fine), I found that the container was crashing every hour or so.

After the issue #99, I removed the health-check from the Dockerfile, and it's been up and running for 9 hours.

It seems it crashes after just about an hour and 10 minutes or so.

Links Do Nothing?

I've reviewed #101 and #107 but my links do absolutely nothing?

xnaas@xnaasSRV:~/docker/envs$ docker exec -it ircd /conf/links.sh LINK1
<link name="ircd1"
      ipaddr="ircd1"
      port="7000"
      sendpass="passwd"
      recvpass="passwd"
      allowmask="172.22.0.0/16"
      >
<autoconnect period="30" server="ircd1">
xnaas@xnaasSRV:~/docker/envs$ docker exec -it ircd1 /conf/links.sh LINK1
<link name="ircd"
      ipaddr="ircd"
      port="7000"
      sendpass="passwd"
      recvpass="passwd"
      allowmask="172.22.0.0/16"
      >
<autoconnect period="30" server="ircd">

Neither of these servers are talking to each other though...

What am I missing?

Edit: And yes, both of the docker containers are in the same docker network.

Edit 2: This is a fresh :latest pull, which is 3.7.0.

Edit 3: The servers can both ping each other...so something tells me something is wrong with the script or the script running. links.conf is always 0 bytes for both containers... ๐Ÿค”

HEALTHCHECK invokes Z-line flood protection

In the current image published to Docker Hub, the HEALTHCHECK command is creating a TCP connection to check if the IRC server is running.

However, the repeated connections are being flagged as a flooding client.

(I added to extra blank lines between messages, in an attempt to chronologically group them togeter)

ircd_1  | Fri Jul 28 02:26:13 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 02:36:13 2017: Connect flooding
ircd_1  | Fri Jul 28 02:26:13 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 02:36:15 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 602 seconds ago)

ircd_1  | Fri Jul 28 02:40:46 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to 
expire on Fri Jul 28 02:50:46 2017: Connect flooding
ircd_1  | Fri Jul 28 02:40:46 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 02:50:47 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

ircd_1  | Fri Jul 28 02:55:18 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 03:05:18 2017: Connect flooding
ircd_1  | Fri Jul 28 02:55:18 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 03:05:19 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

ircd_1  | Fri Jul 28 03:09:50 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 03:19:50 2017: Connect flooding
ircd_1  | Fri Jul 28 03:09:50 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 03:19:51 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

ircd_1  | Fri Jul 28 03:24:22 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 03:34:22 2017: Connect flooding
ircd_1  | Fri Jul 28 03:24:22 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 03:34:23 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

ircd_1  | Fri Jul 28 03:38:54 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 03:48:54 2017: Connect flooding
ircd_1  | Fri Jul 28 03:38:54 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 03:48:55 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

ircd_1  | Fri Jul 28 03:53:26 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 04:03:26 2017: Connect flooding
ircd_1  | Fri Jul 28 03:53:26 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 04:03:28 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 602 seconds ago)

ircd_1  | Fri Jul 28 04:07:59 2017: XLINE: Module m_connectban added Z:line on *@127.0.0.1/32 to expire on Fri Jul 28 04:17:59 2017: Connect flooding
ircd_1  | Fri Jul 28 04:07:59 2017: ANNOUNCEMENT: Connect flooding from IP range 127.0.0.1/32 (10)

ircd_1  | Fri Jul 28 04:18:00 2017: XLINE: Removing expired Z-Line 127.0.0.1/32 (set by irc.myserver.com 601 seconds ago)

Add openssl package to docker image

The openssl binary is not installed on the inspircd docker image. This limits the use of sendmail for many smtp servers since the prefer/require ssl/tls. Currently I am wrapping the base image just to run the following commands:

FROM inspircd/inspircd-docker:latest

USER root
RUN apk add --no-cache \
    openssl

USER inspircd

but since each user change adds a layer, this seems a little extraneous to just add one binary. Any chance this could be added to the base image in the next build?

Not clear how links work

I've been trying to configure links unsuccessfully and I am not sure what I am doing wrong. No matter what, I do not get any output about links and the links.conf ends up zero bytes. I've tried specifying links for just the other server, both servers, tried all of the config options I can see not related to TLS and I am not sure what I am missing. I've just replaced my domain with example.com in all instances.

docker run -d \
  --name inspircd1 \
  --hostname inspircd1 \
  --network macvlan1 \
  --ip 10.0.0.2 \
  --restart unless-stopped \
  --cpus 1 \
  --memory 2g \
  --memory-swap 3g \
  -e INSP_NET_SUFFIX=.example.com \
  -e INSP_NET_NAME=mynet \
  -e INSP_ADMIN_NAME=me \
  -e INSP_ADMIN_NICK=me \
  -e [email protected] \
  -e INSP_ENABLE_DNSBL=no \
  -e INSP_OPER_NAME=me \
  -e INSP_OPER_PASSWORD_HASH="hashhere" \
  -e INSP_OPER_HASH=hmac-sha256 \
  -e INSP_OPER_SSLONLY=no \
  -e INSP_LINK1_NAME=inspircd1.example.com \
  -e INSP_LINK1_IPADDR=10.0.0.2 \
  -e INSP_LINK1_PORT=7000 \
  -e INSP_LINK1_SENDPASS=password \
  -e INSP_LINK1_RECVPASS=password \
  -e INSP_LINK1_TLS_ON=no \
  -e INSP_LINK1_AUTOCONNECT=yes \
  -e INSP_LINK2_NAME=inspircd2.example.com \
  -e INSP_LINK2_IPADDR=10.0.0.3 \
  -e INSP_LINK2_PORT=7000 \
  -e INSP_LINK2_SENDPASS=password \
  -e INSP_LINK2_RECVPASS=password \
  -e INSP_LINK2_TLS_ON=no \
  -e INSP_LINK2_AUTOCONNECT=yes \
  inspircd/inspircd-docker:3.3

Any ideas what I am doing wrong?

Configurations file added into conf.d or as a secret not being read

When trying to test the Docker version, I tested the conf.d setup for my MOTD as well as setting up opers.conf with a secret. Both were setup following the directions in the README.md file. The MOTD redirection to my custom one failed to be seen and my opers.conf file was never read. In digging through the running container, I found no reference to conf.d in any config file or script. I also found the only secret being checked for is the SSL certificates and that is in the entrypoint.sh script. Can someone check to see if a connection got severed somewhere in the development or if I am doing something wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.