Skip to content

Instantly share code, notes, and snippets.

@smaction
Created June 8, 2018 19:32
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 smaction/bdcc3537150d2a9fa62609481da35394 to your computer and use it in GitHub Desktop.
Save smaction/bdcc3537150d2a9fa62609481da35394 to your computer and use it in GitHub Desktop.
Docker Files for Help
version: '3'
services:
php-apache:
build:
context: ./php-apache
ports:
- 80:80
volumes:
- ./DocumentRoot:/var/www/html:z
# - ./custom:/usr/local/etc/php
links:
- 'mysql'
mysql:
image: mysql:latest
ports:
- 3306:3306
volumes:
- mysql:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_ONETIME_PASSWORD: "yes"
volumes:
mysql:
FROM php:apache
MAINTAINER Scott Miller
COPY apache2/apache2.conf /etc/apache2
COPY custom/php.ini /usr/local/etc/php
RUN apt-get update \
&& apt-get install -y libzip-dev libpng-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install pdo pdo_mysql mysqli zip gd
RUN a2enmod rewrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment