Guest User

Untitled

a guest
Dec 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. ##
  2. ## PHP-Image festelegen
  3. ##
  4. FROM php:7.2-apache
  5.  
  6. ##
  7. ## Maintainer setzen
  8. ##
  9. LABEL maintainer="patrick.froch@easySolutionsIT.de"
  10.  
  11. ##
  12. ## ARGS
  13. ##
  14. ARG APACHE_RUN_USER=1000
  15. ARG APACHE_RUN_GROUP=1000
  16.  
  17. ##
  18. ## User und Gruppe mit den richtigen ids erstellen
  19. RUN groupmod -g $APACHE_RUN_GROUP www-data && usermod -u $APACHE_RUN_USER -g $APACHE_RUN_GROUP www-data
  20.  
  21. ##
  22. ## Zeitzone setzen
  23. ##
  24. RUN ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
  25.  
  26. ##
  27. ## Abhängigkeiten installieren
  28. ##
  29. RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y libbz2-dev libc-client-dev libfreetype6-dev libicu-dev libjpeg62-turbo-dev libkrb5-dev libmcrypt-dev libpng-dev libxml2-dev
  30.  
  31. ##
  32. ## Core-Erweiterungen installieren
  33. ##
  34.  
  35. # Install bcmath
  36. RUN docker-php-ext-install bcmath
  37.  
  38. # Install bz2 (need libbz2-dev)
  39. RUN docker-php-ext-install bz2
  40.  
  41. # Install calendar
  42. RUN docker-php-ext-install calendar
  43.  
  44. # Install exif
  45. RUN docker-php-ext-install exif
  46.  
  47. # Install (need libfreetype6-dev libjpeg62-turbo-dev libpng-dev)
  48. RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install -j$(nproc) gd
  49.  
  50. # Install gettext
  51. RUN docker-php-ext-install gettext
  52.  
  53. # Install imap (need libc-client-dev libkrb5-dev)
  54. RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-install imap
  55.  
  56. # Install intl (need libicu-dev)
  57. RUN docker-php-ext-configure intl && docker-php-ext-install intl
  58.  
  59. # Install mysqli
  60. RUN docker-php-ext-install mysqli
  61.  
  62. # Install pcntl
  63. RUN docker-php-ext-install pcntl
  64.  
  65. # Install pod
  66. RUN docker-php-ext-install pdo
  67.  
  68. # Install pdo_mysql
  69. RUN docker-php-ext-install pdo_mysql
  70.  
  71. # Install soap (need libxml2-dev)
  72. RUN docker-php-ext-install soap
  73.  
  74. # Install sockets
  75. RUN docker-php-ext-install sockets
  76.  
  77. # Install (need zlib1g-dev)
  78. RUN docker-php-ext-install zip
  79.  
  80.  
  81. ##
  82. ## PECL-Erweiterungen installieren
  83. ##
  84.  
  85. # Install mcrypt (need libmcrypt-dev)
  86. RUN pecl install mcrypt-1.0.1 && docker-php-ext-enable mcrypt
  87.  
  88. # Install xdebug
  89. RUN pecl install xdebug-2.6.1
  90.  
  91. ##
  92. ## php.ini auf Vorlage für Entwicklung umstellen
  93. ##
  94. RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
  95.  
  96.  
  97. ##
  98. ## php.ini einfügen
  99. ##
  100. COPY etc/php-72.ini $PHP_INI_DIR/conf.d/
  101.  
  102. ##
  103. ## Enable vhosts
  104. ##
  105. RUN a2enmod vhost_alias
  106.  
  107. ##
  108. ## Enable mod_rewrite
  109. ##
  110. RUN a2enmod rewrite
  111.  
  112. ##
  113. ## Apache-Konfiguration einbinden
  114. ##
  115. COPY sites-enabled/8072-default.conf /etc/apache2/sites-available/000-default.conf
  116.  
  117. ##
  118. ## Apache neu starten
  119. ##
  120. RUN service apache2 restart
Add Comment
Please, Sign In to add comment