FROM alpine as builder RUN apk add git cvs make gcc g++ musl-dev zlib-dev RUN set -ex; cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat; \ cd libowfat; \ make ${nproc}; \ cd ..; RUN set -ex; git clone git://erdgeist.org/opentracker; \ cd opentracker; \ sed -i '/FEATURES+=-DWANT_RESTRICT_STATS$/s/^#/#/' Makefile; \ sed -i '/FEATURES+=-DWANT_IP_FROM_QUERY_STRING$/s/^#//' Makefile; \ sed -i '/^FEATURES+=-DWANT_FULLSCRAPE$/s/^//' Makefile; \ sed -i '/^FEATURES+=-DWANT_IP_FROM_PROXY$/s/^#//' Makefile; \ make -j ${nrpoc}; FROM alpine LABEL maintainer="Yezzi Hsueh " ENV XDG_CONFIG_HOME=/config VOLUME ["$XDG_CONFIG_HOME"] EXPOSE 6969/tcp EXPOSE 6969/udp COPY --from=builder opentracker/opentracker /bin/opentracker COPY --from=builder opentracker/opentracker.conf.sample /etc/opentracker/opentracker.conf.sample COPY entrypoint.sh /entrypoint.sh RUN mkdir -p $XDG_CONFIG_HOME && chmod 755 /entrypoint.sh ENTRYPOINT ["/bin/sh", "-c", "/entrypoint.sh"]