diff options
| author | Alexander Barton <alex@barton.de> | 2024-02-09 22:58:44 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2024-03-17 22:42:15 +0100 |
| commit | 934f3a0d88becd5f0434e0d1a1cf8f3195c6486d (patch) | |
| tree | deaf3b4422e2fc55b625fd56b98588fb6864de93 /contrib | |
| parent | c0b8b94550cb589cee39b4e87d8714273d3885f6 (diff) | |
| download | ngircd-934f3a0d88becd5f0434e0d1a1cf8f3195c6486d.tar.gz ngircd-934f3a0d88becd5f0434e0d1a1cf8f3195c6486d.zip | |
Add a Dockerfile and documentation to the project
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/Dockerfile | 62 | ||||
| -rw-r--r-- | contrib/Makefile.am | 1 | ||||
| -rw-r--r-- | contrib/README.md | 3 |
3 files changed, 66 insertions, 0 deletions
diff --git a/contrib/Dockerfile b/contrib/Dockerfile new file mode 100644 index 00000000..33eab278 --- /dev/null +++ b/contrib/Dockerfile @@ -0,0 +1,62 @@ +# ngIRCd -- The Next Generation IRC Daemon +# Copyright (c)2001-2024 Alexander Barton (alex@barton.de) and Contributors + +# Build Container + +FROM docker.io/library/debian:stable-slim AS build +USER root +RUN apt-get -y update \ + && apt-get -y install --no-install-recommends \ + autoconf \ + automake \ + build-essential \ + expect \ + gawk \ + git \ + libgnutls28-dev \ + libident-dev \ + libpam0g-dev \ + openssl \ + pkg-config \ + telnet \ + zlib1g-dev \ + && mkdir -p /usr/local/src/ngircd /opt/ngircd \ + && chown bin:bin /usr/local/src/ngircd /opt/ngircd +WORKDIR /usr/local/src/ngircd +COPY . /usr/local/src/ngircd +RUN chown -R bin /usr/local/src/ngircd +USER bin +RUN ./autogen.sh --prefix=/opt/ngircd \ + --with-gnutls \ + --with-iconv \ + --with-ident \ + --with-pam \ + && make all \ + && make -C src/ngircd check \ + && make install \ + && printf \ + "# ngircd.conf\n\n[Global]\nServerGID=irc\nServerUID=irc\n\n[Options]\nIdent=no\nPAM=no\n\n[SSL]\nCAFile=/etc/ssl/certs/ca-certificates.crt\n" \ + >/opt/ngircd/etc/ngircd.conf \ + && chmod -R a+rX /opt/ngircd + +# Run container + +FROM docker.io/library/debian:stable-slim +USER root +RUN apt-get -y update \ + && apt-get -y install --no-install-recommends --no-install-suggests \ + ca-certificates \ + catatonit \ + libgnutls30 \ + libident \ + libpam0g \ + libwrap0 \ + zlib1g \ + && apt-get -y clean \ + && rm -rf /var/cache/debconf/*-old /var/lib/apt/lists/* +COPY --from=build /opt/ngircd /opt/ngircd +USER irc +ENTRYPOINT [ "/usr/bin/catatonit", "--", "/opt/ngircd/sbin/ngircd", "--nodaemon" ] +EXPOSE 6667 6697 +HEALTHCHECK --interval=30s --timeout=5s --retries=1 --start-period=5s \ + CMD [ "/usr/bin/grep", "-F", ":1A0B ", "/proc/net/tcp" ] diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 27731b3f..f2d99012 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -14,6 +14,7 @@ SUBDIRS = Debian EXTRA_DIST = README.md \ de.barton.ngircd.metainfo.xml \ de.barton.ngircd.plist \ + Dockerfile \ ngindent.sh \ ngircd-bsd.sh \ ngIRCd-Logo.gif \ diff --git a/contrib/README.md b/contrib/README.md index 4f04dce6..fdd46495 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -9,6 +9,9 @@ This `contrib/` directory contains the following sub-folders and files: - `de.barton.ngircd.plist[.tmpl]`: launchd(8) property list file. +- `Dockerfile`: Container definition file, for Docker or Podman for example. + More information can be found in the `doc/Container.md` file. + - `ngindent.sh`: Script to indent the code of ngIRCd in the "standard way". - `ngircd-bsd.sh`: Start/stop script for FreeBSD. |