Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. FROM alpine:3.13
  2. LABEL maintainer "[email protected]"
  3. # build minimized
  4. WORKDIR /
  5. RUN apk add --no-cache --virtual .build-tools git g++ build-base linux-headers cmake && \
  6. apk add --no-cache --virtual .build-deps curl-dev rapidjson-dev libevent-dev pcre2-dev yaml-cpp-dev && \
  7. git clone https://github.com/ftk/quickjspp --depth=1 && \
  8. cd quickjspp && \
  9. git submodule update --init && \
  10. cmake -DCMAKE_BUILD_TYPE=Release . && \
  11. make -j2 && \
  12. install -m644 quickjs/libquickjs.a /usr/lib && \
  13. install -d /usr/include/quickjs/ && \
  14. install -m644 quickjs/quickjs.h quickjs/quickjs-libc.h /usr/include/quickjs/ && \
  15. install -m644 quickjspp.hpp /usr/include && \
  16. cd .. && \
  17. git clone https://github.com/PerMalmberg/libcron --depth=1 && \
  18. cd libcron && \
  19. cmake -DCMAKE_BUILD_TYPE=Release . && \
  20. make -j4 && \
  21. install -m644 libcron/out/Release/liblibcron.a /usr/lib/ && \
  22. install -d /usr/include/libcron/ && \
  23. install -m644 libcron/include/libcron/* /usr/include/libcron/ && \
  24. install -d /usr/include/date/ && \
  25. install -m644 libcron/externals/date/include/date/* /usr/include/date/ && \
  26. cd .. && \
  27. git clone https://github.com/tindy2013/subconverter --depth=1 && \
  28. cd subconverter && \
  29. cmake -DCMAKE_BUILD_TYPE=Release . && \
  30. make -j4 && \
  31. mv subconverter /usr/bin && \
  32. mv base ../ && \
  33. cd .. && \
  34. rm -rf subconverter && \
  35. apk add --no-cache --virtual subconverter-deps pcre2 libcurl yaml-cpp libevent && \
  36. apk del .build-tools .build-deps
  37. # set entry
  38. WORKDIR /base
  39. CMD subconverter