Guest User

Untitled

a guest
Sep 16th, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. FROM httpd:2.4
  2.  
  3. LABEL new_0ch_Plus %%NEW-0CH-VERSION%%
  4.  
  5. ARG NEW_ZEROCHPLUS_VERSION=%%NEW-0CH-VERSION%%
  6.  
  7. RUN apt-get update \
  8. && apt-get install -y --no-install-recommends \
  9. curl \
  10. ca-certificates \
  11. perl \
  12. make \
  13. gcc \
  14. libxml-parser-perl \
  15. libc6-dev \
  16. && rm -rf /var/lib/apt/lists/* && \
  17. curl https://github.com/PrefKarafuto/New_0ch_Plus/archive/refs/tags/v${NEW_ZEROCHPLUS_VERSION}.tar.gz
  18.  
  19. RUN curl -L http://cpanmin.us | perl - App::cpanminus \
  20. && cpanm local::lib CGI::Session Digest::SHA::PurePerl List::MoreUtils Net::DNS XML::Simple LWP::UserAgent JSON
  21.  
  22. RUN sed -i.bak -e \
  23. 's%#LoadModule cgid_module%LoadModule cgid_module%g; \
  24. s%#AddHandler cgi-script .cgi%AddHandler cgi-script .pl .cgi%g; \
  25. s%#ServerName www.example.com:80%ServerName localhost:80%g; \
  26. s%Options Indexes FollowSymLinks%Options Indexes FollowSymLinks ExecCGI%g;' \
  27. /usr/local/apache2/conf/httpd.conf
  28.  
  29.  
  30. RUN mkdir -p /tmp/zerochplus \
  31. && curl -L curl https://github.com/PrefKarafuto/New_0ch_Plus/archive/refs/tags/v${NEW_ZEROCHPLUS_VERSION}.tar.gz -o /tmp/zerochplus/zerochplus_${NEW_ZEROCHPLUS_VERSION}.tar.gz \
  32. && tar xvzf /tmp/zerochplus/zerochplus_${ZEROCHPLUS_VERSION}.tar.gz -C /tmp/zerochplus \
  33. && cp -R /tmp/zerochplus/zerochplus_${ZEROCHPLUS_VERSION}/test /usr/local/apache2/htdocs \
  34. && rm -rf /tmp/zerochplus \
  35. && cd /usr/local/apache2/htdocs \
  36. && chmod 707 . \
  37. && chmod 705 test \
  38. && find test -maxdepth 1 -name *.cgi | xargs chmod 705 \
  39. && find test -name *.pl | xargs chmod 604 \
  40. && find test -name index.html | xargs chmod 600 \
  41. && chmod 705 test/datas test/module test/admin test/plugin test/perllib \
  42. && find test/perllib -type d | xargs chmod 705 \
  43. && chmod 707 test/info test/info/.session test/plugin_conf
Advertisement
Add Comment
Please, Sign In to add comment