Skip to content

Instantly share code, notes, and snippets.

@Xilesun
Last active July 18, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xilesun/14f41e8fd2e98b991c6befd3fa73b2c1 to your computer and use it in GitHub Desktop.
Save Xilesun/14f41e8fd2e98b991c6befd3fa73b2c1 to your computer and use it in GitHub Desktop.
docker configuration
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
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