Dockerfile for running a MediaWiki server via Apache-PHP. #krash https://pages.charlesreid1.com/d-mediawiki
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

61 lines
2.2 KiB

  1. FROM mediawiki
  2. EXPOSE 8989
  3. VOLUME ["/var/www/html"]
  4. # Install ImageMagick
  5. # and math stuff mentioned by Math extension readme
  6. RUN apt-get update && \
  7. apt-get install -y build-essential \
  8. dvipng \
  9. ocaml \
  10. ghostscript \
  11. imagemagick \
  12. texlive-latex-base \
  13. texlive-latex-extra \
  14. texlive-fonts-recommended \
  15. texlive-lang-greek \
  16. texlive-latex-recommended
  17. # Copy skins, config files, and other particulars into container
  18. # WARNING: DOCKER STUPIDITY AHEAD
  19. # MediaWiki needs everything, everything, to be in one folder.
  20. # Docker is totally incapable of mounting a file in a volume.
  21. # I cannot update LocalSettings.php without clearing the cache.
  22. # I cannot clear the cache without reinstalling all of latex.
  23. # I can't bind-mount the skins dir, because then it's owned by root.
  24. # I can't fix the fact that all bind-mounted dirs are owned by root,
  25. # because I can only add commands in THIS DOCKERFILE.
  26. # and when you run the commands in this dockerfile,
  27. # YOU CANNOT SEE THE BIND-MOUNTED STUFF.
  28. # Extensions
  29. COPY charlesreid1-config/mediawiki/extensions/EmbedVideo /var/www/html/extensions/EmbedVideo
  30. COPY charlesreid1-config/mediawiki/extensions/Math /var/www/html/extensions/Math
  31. COPY charlesreid1-config/mediawiki/extensions/ParserFunctions /var/www/html/extensions/ParserFunctions
  32. COPY charlesreid1-config/mediawiki/extensions/SyntaxHighlight_GeSHi /var/www/html/extensions/SyntaxHighlight_GeSHi
  33. RUN chown -R www-data:www-data /var/www/html/*
  34. # Skins
  35. COPY charlesreid1-config/mediawiki/skins /var/www/html/skins
  36. RUN chown -R www-data:www-data /var/www/html/skins
  37. # Settings
  38. COPY charlesreid1-config/mediawiki/LocalSettings.php /var/www/html/LocalSettings.php
  39. RUN chown -R www-data:www-data /var/www/html/LocalSettings*
  40. RUN chmod 600 /var/www/html/LocalSettings.php
  41. # Apache conf file
  42. COPY charlesreid1-config/apache/*.conf /etc/apache2/sites-enabled/
  43. RUN a2enmod rewrite
  44. RUN service apache2 restart
  45. # PHP conf file
  46. # https://hub.docker.com/_/php/
  47. #COPY config/php.ini /usr/local/etc/php/
  48. # make texvc
  49. CMD cd /var/www/html/extensions/Math/math && make && apache2-foreground