Created
October 31, 2018 02:10
-
-
Save sergsoares/dfc4ecf27f2563a12bd934351e002e20 to your computer and use it in GitHub Desktop.
Dockerfile para criar container com php7.2 e extensões
This file contains hidden or 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 ubuntu:xenial | |
| LABEL Description="PHP-FPM v7.2" | |
| LABEL Version="1.0.0" | |
| ENV TIME_ZONE America/Sao_Paulo | |
| RUN apt-get update -yqq \ | |
| && apt-get install -yqq \ | |
| ca-certificates \ | |
| git \ | |
| gcc \ | |
| make \ | |
| wget \ | |
| mc \ | |
| curl \ | |
| sendmail | |
| RUN DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | |
| RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python-software-properties | |
| RUN DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common | |
| RUN DEBIAN_FRONTEND=noninteractive LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
| ## Install php7.2 extension | |
| RUN apt-get update -yqq \ | |
| && apt-get install -yqq \ | |
| php7.2-pgsql \ | |
| php7.2-mysql \ | |
| php7.2-opcache \ | |
| php7.2-common \ | |
| php7.2-mbstring \ | |
| php7.2-zip \ | |
| php7.2-soap \ | |
| php7.2-cli \ | |
| php7.2-intl \ | |
| php7.2-json \ | |
| php7.2-xsl \ | |
| php7.2-imap \ | |
| php7.2-ldap \ | |
| php7.2-curl \ | |
| php7.2-xml \ | |
| php7.2-gd \ | |
| php7.2-dev \ | |
| php7.2-fpm \ | |
| php7.2-bcmath \ | |
| && apt-get install pkg-config \ | |
| && pecl install mongodb \ | |
| && echo "extension=mongodb.so" > /etc/php/7.2/cli/conf.d/ext-mongodb.ini \ | |
| && echo "extension=mongodb.so" > /etc/php/7.2/fpm/conf.d/ext-mongodb.ini \ | |
| && apt-get install -y -q --no-install-recommends \ | |
| ssmtp | |
| # Add default timezone | |
| RUN echo $LYBERTEAM_TIME_ZONE > /etc/timezone | |
| RUN echo "date.timezone=$LYBERTEAM_TIME_ZONE" > /etc/php/7.2/cli/conf.d/timezone.ini | |
| ## Install composer globally | |
| RUN echo "Install composer globally" | |
| RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer | |
| RUN usermod -aG www-data www-data | |
| # Reconfigure system time | |
| RUN dpkg-reconfigure -f noninteractive tzdata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment