Skip to content

Instantly share code, notes, and snippets.

@jasonmccallister
Last active July 25, 2017 14:07
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 jasonmccallister/47f3ea237fa9015a03d9bb10315a1135 to your computer and use it in GitHub Desktop.
Save jasonmccallister/47f3ea237fa9015a03d9bb10315a1135 to your computer and use it in GitHub Desktop.
FROM php:7.0-apache
MAINTAINER Jason McCallister <jason.mccallister@traderinteractive.com>
# arguments for the installation
ARG BLD_PKGS="libfreetype6-dev libjpeg62-turbo-dev libpng12-dev libicu-dev"
ARG PHP_EXTS="pdo pdo_mysql gd"
# install needed items (php extensions)
RUN apt-get update \
&& apt-get install -y $BLD_PKGS \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install $PHP_EXTS
.PHONY: build test
.DEFAULT_TARGET: build
# Project information
COMPANY := traderinteractive
IMAGE := httpd
PHP_VERSION := 7.0
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PWD := $(dir $(MAKEPATH))
build:
docker build -t $(COMPANY)/$(IMAGE) .
docker build -t $(COMPANY)/$(IMAGE):$(PHP_VERSION) .
test:
docker run --rm \
-d -p 8000:80 \
--volume test:/var/www/html \
$(COMPANY)/$(IMAGE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment