34 lines
723 B
Docker
34 lines
723 B
Docker
|
FROM alpine:latest
|
||
|
|
||
|
# Create ircd user
|
||
|
RUN addgroup -S ircd && adduser -S -G ircd ircd
|
||
|
ENV HOME=/home/ircd
|
||
|
|
||
|
# Install prerequisites
|
||
|
RUN apk add --no-cache gcc make openssl-dev build-base
|
||
|
|
||
|
# Copy and extract ratbox source
|
||
|
COPY ircd-ratbox-3.0.10.tar.bz2 /tmp
|
||
|
RUN cd /tmp && tar jxvf ircd-ratbox-3.0.10.tar.bz2
|
||
|
|
||
|
# Compile ratbox
|
||
|
RUN cd /tmp/ircd-ratbox-3.0.10/ \
|
||
|
&& ./configure --prefix=/home/ircd --enable-openssl --enable-ipv6 \
|
||
|
&& make \
|
||
|
&& make install \
|
||
|
&& rm -rf /tmp/*
|
||
|
|
||
|
# Set up ratbox
|
||
|
COPY ircd.conf /home/ircd/etc/ircd.conf
|
||
|
RUN mkdir /home/ircd/logs
|
||
|
RUN chown -R ircd:ircd /home/ircd/
|
||
|
|
||
|
# Expose ports
|
||
|
EXPOSE 6667
|
||
|
|
||
|
# Start ratbox
|
||
|
USER ircd
|
||
|
WORKDIR /home/ircd
|
||
|
CMD ["bin/ircd", "-foreground"]
|
||
|
# CMD ["/bin/sh"]
|