LavoWeb / Docker

Docker by LavoWeb
https://hub.docker.com/u/lavoweb
12 stars 10 forks source link

PHP 5.4 Version Dockerfile #3

Open janani0994 opened 1 year ago

janani0994 commented 1 year ago

FROM php:5.4-apache

Install Apache

RUN apt-get install --yes apache2

RUN apt-get update RUN apt-get install --yes --force-yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev

PHP Configuration

RUN docker-php-ext-install bcmath RUN docker-php-ext-install bz2 RUN docker-php-ext-install calendar RUN docker-php-ext-install dba RUN docker-php-ext-install exif RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr RUN docker-php-ext-install gd RUN docker-php-ext-install gettext RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl RUN docker-php-ext-install imap RUN docker-php-ext-install intl RUN docker-php-ext-install mcrypt RUN docker-php-ext-install mysql mysqli pdo pdo_mysql RUN docker-php-ext-install soap RUN docker-php-ext-install tidy RUN docker-php-ext-install xmlrpc RUN docker-php-ext-install mbstring RUN docker-php-ext-install xsl RUN docker-php-ext-install zip RUN yes '' | pecl install -f apc RUN docker-php-ext-configure hash --with-mhash

Apache Configuration

RUN a2enmod rewrite RUN a2enmod headers

SSL

RUN a2enmod ssl RUN a2ensite default-ssl RUN openssl req -subj '/CN=example.com/O=My Company Name LTD./C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem

Imagemagick

RUN apt-get install --yes --force-yes libmagickwand-dev libmagickcore-dev RUN yes '' | pecl install -f imagick RUN docker-php-ext-enable imagick RUN chown -R www-data:www-data /var/www ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2

Copy Application Files

RUN rm -rf /var/www/html/* ADD opstools/OPSITPublisherTools /var/www/html

Open port 80

EXPOSE 80

Start Apache service

CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]

janani0994 commented 1 year ago

Facing the error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.