]>
Commit | Line | Data |
---|---|---|
446026a1 SW |
1 | FROM alpine:3.17 AS build |
2 | ||
3 | RUN apk --no-cache update && \ | |
4 | apk --no-cache upgrade && \ | |
5 | apk --no-cache add \ | |
6 | build-base \ | |
7 | autoconf \ | |
8 | automake \ | |
9 | libtool \ | |
10 | pkgconfig \ | |
11 | check-dev \ | |
12 | file \ | |
13 | bison | |
14 | ||
15 | COPY . /src | |
16 | ||
17 | RUN cd /src && \ | |
18 | ./configure --build="$(arch)-unknown-linux-gnu" \ | |
19 | --prefix=/ircd \ | |
20 | --with-cpath=/ircd/etc/ircd.conf \ | |
21 | --with-maxcon=1024 && \ | |
22 | make && \ | |
23 | make install && \ | |
24 | chmod 711 /ircd/bin/umkpasswd | |
25 | ||
26 | CMD /bin/sh | |
27 | ||
28 | FROM alpine:3.17 | |
29 | MAINTAINER ratler@undernet.org | |
30 | ||
31 | EXPOSE 4400/tcp 6667/tcp 6669/tcp | |
32 | ||
33 | RUN apk --no-cache update && \ | |
34 | apk --no-cache upgrade | |
35 | ||
36 | RUN addgroup -S ircd && \ | |
37 | adduser -D -S -s /sbin/nologin -G ircd ircd | |
38 | ||
39 | COPY --from=build /ircd /ircd | |
40 | ||
41 | RUN chown -R ircd:ircd /ircd/lib | |
42 | ||
43 | USER ircd | |
44 | WORKDIR /ircd | |
45 | ENTRYPOINT ["/ircd/bin/ircd", "-n"] |