Last active
July 25, 2017 14:07
-
-
Save jasonmccallister/47f3ea237fa9015a03d9bb10315a1135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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