Files
subconverter/scripts/Dockerfile
Tindy X 3d67406af6 Complete refactor of project file structure
Fix incorrect handing of default node parameters in SSD subscription.
Fix unable to parse some Clash rule-providers (#289).
Fix not filtering inline comments in some Surge rulesets. (#285)
Add Cron task options.
Add clean context option for persisting a JS context across the whole request.
Replace JS engine with QuickJS.
2021-03-23 18:09:00 +08:00

40 lines
1.5 KiB
Docker

FROM alpine:3.13
LABEL maintainer "tindy.it@gmail.com"
# build minimized
WORKDIR /
RUN apk add --no-cache --virtual .build-tools git g++ build-base linux-headers cmake && \
apk add --no-cache --virtual .build-deps curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev && \
git clone https://github.com/ftk/quickjspp --depth=1 && \
cd quickjspp && \
cmake -DCMAKE_BUILD_TYPE=Release . && \
make -j4 && \
install -m644 quickjs/libquickjs.a /usr/lib && \
install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/include/quickjs && \
install -m644 quickjspp.hpp /usr/include && \
cd .. && \
git clone https://github.com/PerMalmberg/libcron --depth=1 && \
cd libcron && \
cmake -DCMAKE_BUILD_TYPE=Release . && \
make -j4 && \
install -m644 libcron/out/Release/liblibcron.a /usr/lib && \
install -d /usr/include/libcron/ && \
install -m644 libcron/include/libcron/* /usr/include/libcron/ && \
install -d /usr/include/date/ && \
install -m644 libcron/externals/date/include/date/* /usr/include/date/ && \
cd .. && \
git clone https://github.com/tindy2013/subconverter --depth=1 && \
cd subconverter && \
cmake -DCMAKE_BUILD_TYPE=Release . && \
make -j4 && \
mv subconverter /usr/bin && \
mv base ../ && \
cd .. && \
rm -rf subconverter && \
apk add --no-cache --virtual subconverter-deps pcre2 libcurl yaml-cpp libevent && \
apk del .build-tools .build-deps
# set entry
WORKDIR /base
CMD subconverter