-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
61 lines (46 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM alpine:3.9 AS build-env
# install latest updates and configure alpine
RUN apk update
RUN apk upgrade
RUN apk add --no-cache build-base git
# get ircd
WORKDIR /tmp
RUN wget http://www.irc.org/ftp/irc/server/irc2.11.2p3.tgz
RUN tar -xzf irc2.11.2p3.tgz
# configure it
WORKDIR /tmp/irc2.11.2p3
RUN ./configure --prefix=/ircd-bin
# # IPv6 results in "No working P-line in ircd.conf" so we don't do it ¯\_(ツ)_/¯
# RUN ./configure --enable-ipv6 --prefix=/ircd-bin
# apply weird alpine patch
WORKDIR /tmp/irc2.11.2p3/ircd/
COPY ircd-alpine.patch /tmp/ircd-alpine.patch
RUN patch < /tmp/ircd-alpine.patch
# apply kline/xline-enabling patch
# we use git here because busybox's default patch seems kinda ew
WORKDIR /tmp/irc2.11.2p3/x86_64-unknown-linux-gnu
COPY ircd-kline.patch /tmp/ircd-kline.patch
RUN cp config.h config.h.old
RUN git apply /tmp/ircd-kline.patch
# building!
RUN make all
RUN make install
CMD /bin/sh
## run unreal
FROM alpine:3.9
# metadata
LABEL maintainer="[email protected]"
LABEL description="IRC Foundation IRCd-irc2 Testing Server"
# install latest updates and configure alpine
RUN apk update
RUN apk upgrade
RUN mkdir /lib/modules
# ircd ports
EXPOSE 4440/tcp 5550/tcp
# copy over the ircd
COPY --from=build-env /ircd-bin /ircd-bin
COPY ircd.conf /ircd-bin/etc/ircd.conf
COPY ircd.motd /ircd-bin/etc/ircd.motd
# launch
WORKDIR /ircd-bin
ENTRYPOINT ["/ircd-bin/sbin/ircd", "-t"]