FROM alpine as builder RUN apk add git cvs make gcc g++ musl-dev zlib-dev # 下载依赖库 libowfat 和 opentracker,设置 opentracker 特性:不公开详细信息、允许通告ip、关闭fullscrape、允许代理ip 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"]