2021-10-17 00:01:17 +03:00
|
|
|
FROM debian:unstable-slim as base
|
|
|
|
|
2021-10-12 02:40:30 +03:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
&& apt-get install -y git build-essential pkg-config libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev \
|
2021-10-17 00:01:17 +03:00
|
|
|
&& mkdir /opt/unrealircd \
|
|
|
|
&& cd /opt/unrealircd \
|
|
|
|
&& git clone https://github.com/unrealircd/unrealircd.git --depth 1 . \
|
|
|
|
&& ./configure \
|
|
|
|
--with-showlistmodes \
|
|
|
|
--enable-ssl \
|
|
|
|
--with-bindir=/app/bin \
|
|
|
|
--with-datadir=/app/data \
|
|
|
|
--with-pidfile=/app/data/unrealircd.pid \
|
|
|
|
--with-confdir=/app/conf \
|
|
|
|
--with-modulesdir=/app/modules \
|
|
|
|
--with-logdir=/app/logs \
|
|
|
|
--with-cachedir=/app/cache \
|
|
|
|
--with-docdir=/app/doc \
|
|
|
|
--with-tmpdir=/app/tmp \
|
|
|
|
--with-privatelibdir=/app/lib \
|
|
|
|
--with-scriptdir=/app \
|
|
|
|
--with-nick-history=2000 \
|
|
|
|
--with-permissions=0600 \
|
|
|
|
--enable-dynamic-linking \
|
2021-10-12 02:40:30 +03:00
|
|
|
&& make -j4 \
|
|
|
|
&& make install \
|
|
|
|
&& rm /app/source \
|
2021-10-17 00:01:17 +03:00
|
|
|
&& cp /app/conf/examples/example.conf /app/conf/unrealircd.conf \
|
|
|
|
&& rm -rf /opt/unrealircd \
|
|
|
|
&& cd /app \
|
|
|
|
&& useradd unrealircd \
|
|
|
|
&& chown unrealircd:unrealircd -R /app \
|
|
|
|
&& ldd /app/bin/unrealircd | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'mkdir -p $(dirname /app/deps%); cp % /app/deps%;' \
|
|
|
|
&& apt purge --yes git build-essential pkg-config libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev \
|
|
|
|
&& apt autoremove --yes --purge \
|
|
|
|
&& cp -r /app/deps/* / \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
USER unrealircd
|
2021-10-12 02:40:30 +03:00
|
|
|
|
|
|
|
CMD /app/unrealircd start \
|
|
|
|
&& until ! [ -f /app/data/unrealircd.pid ]; do sleep 60; done
|
2021-10-17 00:01:17 +03:00
|
|
|
|
|
|
|
EXPOSE 6900 6697 6667
|