-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (37 loc) · 1.16 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
FROM alpine:3.9
MAINTAINER Stevesbrain
ARG BUILD_DATE
ARG VERSION
LABEL build_version="stevesbrain version:- ${VERSION} Build-date:- ${BUILD_DATE}"
ARG CONFIGUREFLAGS="--enable-openssl --prefix=/irc"
ENV CHARYBDIS_RELEASE 3.5.6
# Build Charybdis
RUN set -x \
&& apk add --no-cache --virtual runtime-dependencies \
openssl \
openssl-dev \
build-base \
curl \
bison \
flex \
&& mkdir /charybdis-src && cd /charybdis-src \
&& curl -fsSL "https://github.com/charybdis-ircd/charybdis/archive/charybdis-${CHARYBDIS_RELEASE}.tar.gz" -o charybdis.tar.gz \
&& tar -zxf charybdis.tar.gz --strip-components=1 \
&& mkdir /irc \
&& ./configure ${CONFIGUREFLAGS} \
&& make \
&& make install \
&& apk del --purge build-dependencies \
openssl-dev \
&& cd /root \
&& rm -rf /charybdis-src \
&& rm -rf /src; exit 0
# Add our users for charybdis
RUN adduser -u 1000 -S ircd
RUN addgroup -g 1000 -S ircd
#Change ownership as needed
RUN chown -R ircd:ircd /irc
#The user that we enter the container as, and that everything runs as
USER ircd
ENV BUILD 0.2.1
ENTRYPOINT ["/irc/bin/ircd", "-pidfile", "/irc/ircd.pid", "-foreground"]