Skip to content

Instantly share code, notes, and snippets.

@daviesgeek
Created May 7, 2015 23:23
Show Gist options
  • Select an option

  • Save daviesgeek/affb123bdafba764fd49 to your computer and use it in GitHub Desktop.

Select an option

Save daviesgeek/affb123bdafba764fd49 to your computer and use it in GitHub Desktop.
PHP/Apache image for Laravel

Simple PHP/Apache image for Laravel

web:
build: .
command: "apache2-foreground"
ports:
- "80:80"
- "8000:8000"
links:
- db
db:
image: mysql
environment:
MYSQL_DATABASE: 'streams'
MYSQL_ROOT_PASSWORD: 'pyrocms'
FROM php:5.6-apache
# Install modules
RUN apt-get update && apt-get install -y \
vim git \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install mcrypt mbstring zip pdo_mysql \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
RUN bash -c "curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer"
COPY . /src
RUN a2enmod rewrite
RUN rm -rf /var/www/html && ln -s /src/public /var/www/html
RUN chmod 777 /src/storage && chmod 777 /src/storage/framework && chmod 777 /src/storage/framework/views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment