Created
November 13, 2018 14:25
-
-
Save alancpazetto/5890e4b446033ff83b8cdac24a4967f8 to your computer and use it in GitHub Desktop.
Docker compose PHP + Mysql + PHPMyAdmin
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
version: '3.1' | |
services: | |
php: | |
image: php-test | |
ports: | |
- 35412:80 | |
links: | |
- mysql:db | |
volumes: | |
- ./app:/var/www/html | |
mysql: | |
image: mysql:latest | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin:latest | |
ports: | |
- 35413:80 | |
links: | |
- mysql:db | |
environment: | |
MYSQL_ROOT_PASSWORD: root |
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 php:7.0-apache | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
cron \ | |
git \ | |
wget \ | |
libc-client-dev \ | |
libicu-dev \ | |
libkrb5-dev \ | |
libmcrypt-dev \ | |
libssl-dev \ | |
libz-dev \ | |
unzip \ | |
zip \ | |
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& rm /etc/cron.daily/* | |
RUN docker-php-ext-configure imap --with-imap --with-imap-ssl --with-kerberos \ | |
&& docker-php-ext-install imap intl mbstring mcrypt mysqli pdo_mysql zip \ | |
&& docker-php-ext-enable imap intl mbstring mcrypt mysqli pdo_mysql zip | |
VOLUME /var/www/html | |
RUN a2enmod rewrite | |
CMD ["apache2-foreground"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment