You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
59 lines
1.4 KiB
3 years ago
|
ARG ATHEME_UID=10000
|
||
|
ARG ATHEME_VERSION=7.2.10-r2
|
||
|
ARG BUILD_CONTRIB_MODULES=
|
||
|
|
||
|
FROM alpine:latest AS builder
|
||
|
ARG ATHEME_VERSION
|
||
|
ARG BUILD_CONTRIB_MODULES
|
||
|
ARG MAKE_NUM_JOBS
|
||
|
|
||
|
# Install build-deps and runtime deps
|
||
|
RUN apk add --no-cache \
|
||
|
build-base \
|
||
|
pkgconf \
|
||
|
openssl-dev \
|
||
|
git
|
||
|
|
||
|
# libexecinfo is used by contrib/gen_echoserver
|
||
|
RUN test -z "$BUILD_CONTRIB_MODULES" || apk add --no-cache libexecinfo-dev
|
||
|
|
||
|
# Checkout from Git - we need to manually bump the libmowgli snapshot to fix compilation against musl
|
||
|
# This will be fixed when 7.3 releases
|
||
|
RUN git clone \
|
||
|
-b v${ATHEME_VERSION} \
|
||
|
--depth=1 \
|
||
|
--recursive \
|
||
|
https://github.com/atheme/atheme.git /atheme-src
|
||
|
|
||
|
WORKDIR /atheme-src
|
||
|
|
||
|
RUN cd libmowgli-2 && \
|
||
|
git pull origin master
|
||
|
|
||
|
# Configure and build
|
||
|
RUN ./configure \
|
||
|
--prefix=/srv/atheme $(test -z "$BUILD_CONTRIB_MODULES" || echo --enable-contrib) && \
|
||
|
make -j${MAKE_NUM_JOBS:-$(nproc)} && \
|
||
|
make install
|
||
|
|
||
|
|
||
|
FROM alpine:latest
|
||
|
ARG ATHEME_UID
|
||
|
ARG BUILD_CONTRIB_MODULES
|
||
|
|
||
|
# openssl: used by some hashing and SASL algorithms
|
||
|
# msmtp: used to route mail to an external mail server
|
||
|
RUN apk add --no-cache \
|
||
|
openssl \
|
||
|
msmtp \
|
||
|
ca-certificates \
|
||
|
&& (test -z "$BUILD_CONTRIB_MODULES" || apk add --no-cache libexecinfo)
|
||
|
|
||
|
RUN adduser -D -u $ATHEME_UID atheme
|
||
|
|
||
|
COPY --from=builder --chown=atheme /srv/atheme /srv/atheme
|
||
|
|
||
|
COPY root/ /
|
||
|
|
||
|
ENTRYPOINT ["/entrypoint.sh"]
|