Created
May 21, 2018 14:46
Docker file for PHP 7.2 fpm with mcrypt support
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.2-fpm | |
# Replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# make sure apt is up to date | |
RUN apt-get update --fix-missing | |
RUN apt-get install -y curl | |
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev | |
RUN apt-get -y install gcc make autoconf libc-dev pkg-config | |
RUN apt-get -y install libmcrypt-dev | |
ENV NVM_DIR /usr/local/nvm | |
ENV NODE_VERSION 9.2.0 | |
# Install nvm with node and npm | |
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \ | |
&& source $NVM_DIR/nvm.sh \ | |
&& nvm install $NODE_VERSION \ | |
&& nvm alias default $NODE_VERSION \ | |
&& nvm use default | |
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | |
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | |
WORKDIR /var/www/html | |
RUN pecl config-set php_ini "${PHP_INI_DIR}/php.ini" | |
RUN pecl install mcrypt-1.0.1 \ | |
&& docker-php-ext-enable mcrypt; | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install gd | |
RUN docker-php-ext-install pdo pdo_mysql mysqli | |
RUN usermod -u 1000 www-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment