-
-
Save nirbhabbarat/1c130e10b82d00d8b8a98ffddb819fa4 to your computer and use it in GitHub Desktop.
Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.3-apache | |
MAINTAINER James Wade <[email protected]> | |
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions | |
# see example at https://hub.docker.com/_/php/ | |
RUN apt-get update && apt-get install -y \ | |
libbz2-dev \ | |
libfreetype6-dev \ | |
libgd-dev \ | |
libjpeg62-turbo-dev \ | |
libmcrypt-dev \ | |
libpng-dev \ | |
libxml2-dev \ | |
zlib1g-dev \ | |
&& docker-php-ext-install iconv mbstring mcrypt soap sockets zip \ | |
&& docker-php-ext-configure gd --enable-gd-native-ttf --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install gd \ | |
&& docker-php-ext-configure mysql --with-mysql=mysqlnd \ | |
&& docker-php-ext-install mysql | |
# enable mod_rewrite | |
RUN a2enmod rewrite | |
# make the webroot a volume | |
VOLUME /var/www/html/ | |
# In images building upon this image, copy the src/ directory to the webserver | |
# root and correct the owner. | |
ONBUILD COPY / /var/www/html/ | |
ONBUILD RUN chown -R www-data:www-data /var/www/html | |
EXPOSE 80 | |
ENTRYPOINT ["apache2-foreground"] | |
#EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment