Skip to content

Instantly share code, notes, and snippets.

@guibranco
Last active March 20, 2024 18:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save guibranco/d9f34ea0e17b433a6b24a78d426ab179 to your computer and use it in GitHub Desktop.
Save guibranco/d9f34ea0e17b433a6b24a78d426ab179 to your computer and use it in GitHub Desktop.
Docker file for PHP 7.4 with Apache, MySQLi extension, GD2 and Apache mod_rewrite enabled
FROM php:7.4-apache
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
RUN a2enmod rewrite
RUN docker-php-ext-install mysqli
RUN docker-php-ext-enable mysqli
RUN docker-php-ext-configure gd --with-freetype=/usr --with-jpeg=/usr
RUN docker-php-ext-install gd
COPY ./ /var/www/html/
@efroostrf
Copy link

Very useful, thank you!

@OskarPodrucki
Copy link

I was looking for this for 2 hours... thanks!

@hansv905
Copy link

good! it's working. thanks :)

@Hameed-Akshal
Copy link

Really it is useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment