Skip to content

Instantly share code, notes, and snippets.

@c3ry5 c3ry5/Dockerfile
Created Dec 19, 2018

Embed
What would you like to do?
Basic Docker Setup for php & MySql with the dependancies for Xenforo
version: '3.3'
services:
db:
image: 'mysql:5.7'
volumes:
- 'db_data:/var/lib/mysql'
restart: always
environment:
MYSQL_DATABASE: myDb
MYSQL_USER: user
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
ports:
- "3306:3306"
www:
depends_on:
- db
build: .
ports:
- '8001:80'
volumes:
- './php:/var/www/html/'
restart: always
environment:
MYSQL_DATABASE: myDb
MYSQL_USER: user
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
volumes:
db_data: {}
FROM php:7.1.2-apache
RUN apt-get update && \
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd
RUN docker-php-ext-install mysqli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.