Skip to content

Instantly share code, notes, and snippets.

@naxrohan
Last active December 31, 2019 14:00
Show Gist options
  • Save naxrohan/cbc943a1b48ed4ab14a4384e19f4edf7 to your computer and use it in GitHub Desktop.
Save naxrohan/cbc943a1b48ed4ab14a4384e19f4edf7 to your computer and use it in GitHub Desktop.
ARG PHP_VERSION="7.2"
FROM php:7.2
#======Install Linux Dependencies
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install libedit-dev -y
RUN apt-get install libxml2 -y
RUN apt-get install libjpeg-dev -y
RUN apt-get install libpng-dev -y
RUN apt-get install mariadb-client -y
RUN apt-get -y install gcc make autoconf libc-dev pkg-config
RUN apt-get install libmcrypt-dev -y
#======PHP Extentions
RUN docker-php-ext-configure bcmath --enable-bcmath
RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql
RUN docker-php-ext-install gd
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install zip
#======Install Composer
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
#======Install Composer packages like Drush
RUN composer global require drush/drush:8.x
RUN ln -s /root/.composer/vendor/drush/drush/drush /usr/bin/drush
#======Copy the php.ini fole
#COPY "php.ini" "$PHP_INI_DIR/php.ini"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment