Last active
July 18, 2018 13:44
-
-
Save Xilesun/14f41e8fd2e98b991c6befd3fa73b2c1 to your computer and use it in GitHub Desktop.
docker configuration
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
version: "2" | |
services: | |
nginx: | |
image: nginx | |
restart: always | |
ports: | |
- "4000:80" | |
volumes: | |
- ./web:/usr/share/nginx/html:ro | |
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro | |
links: | |
- php | |
php: | |
build: ./php | |
restart: always | |
links: | |
- mysql | |
volumes: | |
- ./web:/var/www/html | |
- ./php/php.ini:/usr/local/etc/php/php.ini | |
mysql: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: yangqia | |
MYSQL_DATABASE: web | |
composer: | |
image: composer/composer | |
command: install -vvv --ignore-platform-reqs | |
volumes: | |
- ./web:/app |
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.1.4-fpm | |
RUN apt-get update && apt-get install -y \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libmcrypt-dev \ | |
libpng-dev \ | |
libz-dev \ | |
&& docker-php-ext-install -j$(nproc) iconv mcrypt \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment