Guest User

Untitled

a guest
Dec 14th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. ##
  2. ## PHP-Image festelegen
  3. ##
  4. FROM php:7.0-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 mcrypt (need libmcrypt-dev)
  60. RUN docker-php-ext-install mcrypt
  61.  
  62. # Install mysqli
  63. RUN docker-php-ext-install mysqli
  64.  
  65. # Install pcntl
  66. RUN docker-php-ext-install pcntl
  67.  
  68. # Install pod
  69. RUN docker-php-ext-install pdo
  70.  
  71. # Install pdo_mysql
  72. RUN docker-php-ext-install pdo_mysql
  73.  
  74. # Install soap (need libxml2-dev)
  75. RUN docker-php-ext-install soap
  76.  
  77. # Install sockets
  78. RUN docker-php-ext-install sockets
  79.  
  80. # Install (need zlib1g-dev)
  81. RUN docker-php-ext-install zip
  82.  
  83. ##
  84. ## PECL-Erweiterungen installieren
  85. ##
  86.  
  87. # Install mcrypt (need libmcrypt-dev) (erst ab PHP 7.2)
  88. # RUN pecl install mcrypt-1.0.1 && docker-php-ext-enable mcrypt
  89.  
  90. # Install xdebug
  91. RUN pecl install xdebug-2.6.1
  92.  
  93. ##
  94. ## php.ini auf Vorlage für Entwicklung umstellen
  95. ##
  96. RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
  97.  
  98. ##
  99. ## php.ini einfügen
  100. ##
  101. COPY etc/php-70.ini $PHP_INI_DIR/conf.d/
  102.  
  103. ##
  104. ## Apache-Konfiguration einbinden
  105. ##
  106. COPY sites-enabled/8070-default.conf /etc/apache2/sites-available/000-default.conf
  107.  
  108. ##
  109. ## Enable vhosts
  110. ##
  111. RUN a2enmod vhost_alias
  112.  
  113. ##
  114. ## Enable mod_rewrite
  115. ##
  116. RUN a2enmod rewrite
  117.  
  118. ##
  119. ## Apache neu starten
  120. ##
  121. RUN service apache2 restart
Add Comment
Please, Sign In to add comment