diff --git a/Dockerfile b/Dockerfile index 8dd0204..3f8a29b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ FROM sillelien/base-alpine:0.10 MAINTAINER Michael Dimmock # Install packages -RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ - apk-install nginx \ +RUN apk-install nginx \ bash \ curl \ git \ @@ -18,14 +17,13 @@ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/re php-mysql \ php-pdo_mysql \ php-phar \ - phpredis@testing \ php-openssl && \ curl -sS https://getcomposer.org/installer | php && \ mv composer.phar /usr/local/bin/ && \ rm -Rf /var/www/* -# Add configuration files -ADD rootfs / +# Copy configuration files to root +COPY rootfs / # Fix permissions RUN chown -Rf nginx:www-data /var/www/ diff --git a/Makefile b/Makefile index e1075f5..2646937 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ +CURRENT_DIRECTORY := $(shell pwd) NAME = alpine-nginx-php TAG = latest IMAGE = michaeldim/$(NAME) -.PHONY: all build - -all: build - build: - @docker build -t $(IMAGE):$(TAG) --rm . + @docker build -t $(IMAGE):$(TAG) $(CURRENT_DIRECTORY) + +build-no-cache: + @docker build -t $(IMAGE):$(TAG) --no-cache $(CURRENT_DIRECTORY) + +.PHONY: build build-no-cache diff --git a/README.md b/README.md index 20776f7..43f8d50 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # alpine-nginx-php -Alpine Linux Docker image (~52.46 MB) running Nginx and PHP 5.6.14 Image suitable for running Alpine Linux in Tutum/Kubernetes style hosted distributed environments. +Alpine Linux Docker image (~54.3 MB) running Nginx and PHP 5.6.14 Image suitable for running Alpine Linux in Tutum/Kubernetes style hosted distributed environments. Image is based on [sillelien/base-alpine](https://hub.docker.com/r/sillelien/base-alpine/) base image which incorporates S6 for process management.