Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- ## PHP-Image festelegen
- ##
- FROM php:7.2-apache
- ##
- ## Maintainer setzen
- ##
- LABEL maintainer="patrick.froch@easySolutionsIT.de"
- ##
- ## ARGS
- ##
- ARG APACHE_RUN_USER=1000
- ARG APACHE_RUN_GROUP=1000
- ##
- ## User und Gruppe mit den richtigen ids erstellen
- RUN groupmod -g $APACHE_RUN_GROUP www-data && usermod -u $APACHE_RUN_USER -g $APACHE_RUN_GROUP www-data
- ##
- ## Zeitzone setzen
- ##
- RUN ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
- ##
- ## Abhängigkeiten installieren
- ##
- 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
- ##
- ## Core-Erweiterungen installieren
- ##
- # Install bcmath
- RUN docker-php-ext-install bcmath
- # Install bz2 (need libbz2-dev)
- RUN docker-php-ext-install bz2
- # Install calendar
- RUN docker-php-ext-install calendar
- # Install exif
- RUN docker-php-ext-install exif
- # Install (need libfreetype6-dev libjpeg62-turbo-dev libpng-dev)
- RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install -j$(nproc) gd
- # Install gettext
- RUN docker-php-ext-install gettext
- # Install imap (need libc-client-dev libkrb5-dev)
- RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-install imap
- # Install intl (need libicu-dev)
- RUN docker-php-ext-configure intl && docker-php-ext-install intl
- # Install mysqli
- RUN docker-php-ext-install mysqli
- # Install pcntl
- RUN docker-php-ext-install pcntl
- # Install pod
- RUN docker-php-ext-install pdo
- # Install pdo_mysql
- RUN docker-php-ext-install pdo_mysql
- # Install soap (need libxml2-dev)
- RUN docker-php-ext-install soap
- # Install sockets
- RUN docker-php-ext-install sockets
- # Install (need zlib1g-dev)
- RUN docker-php-ext-install zip
- ##
- ## PECL-Erweiterungen installieren
- ##
- # Install mcrypt (need libmcrypt-dev)
- RUN pecl install mcrypt-1.0.1 && docker-php-ext-enable mcrypt
- # Install xdebug
- RUN pecl install xdebug-2.6.1
- ##
- ## php.ini auf Vorlage für Entwicklung umstellen
- ##
- RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
- ##
- ## php.ini einfügen
- ##
- COPY etc/php-72.ini $PHP_INI_DIR/conf.d/
- ##
- ## Enable vhosts
- ##
- RUN a2enmod vhost_alias
- ##
- ## Enable mod_rewrite
- ##
- RUN a2enmod rewrite
- ##
- ## Apache-Konfiguration einbinden
- ##
- COPY sites-enabled/8072-default.conf /etc/apache2/sites-available/000-default.conf
- ##
- ## Apache neu starten
- ##
- RUN service apache2 restart
Add Comment
Please, Sign In to add comment