Skip to content

Commit

Permalink
Merge pull request #3 from Dalee/php7
Browse files Browse the repository at this point in the history
php7
  • Loading branch information
arkady-emelyanov authored Jun 1, 2017
2 parents 7b14429 + cce4958 commit b7c51fa
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Dockerfile.php-5.6
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ RUN echo "\nexport COMPOSER_ALLOW_SUPERUSER=1\n" >> /root/.bashrc && \
RUN apt-get -qq clean && \
apt-get -qq autoremove --purge && \
rm -rf \
/etc/php/7.0 \
/etc/php/7.1 \
/var/lib/apt/lists/* \
/usr/share/doc/* \
/usr/share/man/* \
Expand Down
63 changes: 63 additions & 0 deletions Dockerfile.php-7
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
FROM dalee/baseimage:latest

ENV DEBIAN_FRONTEND=noninteractive

#
# php: 4F4EA0AAE5267A6C
#
RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/php7.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \
apt-get -qq update

# Install
RUN apt-get -qq install -y \
php-common \
php-cli \
php-fpm \
php-pgsql \
php-mysql \
php-gd \
php-bz2 \
php-zip \
php-json \
php-xml \
php-curl \
php-intl \
php-mbstring \
php-mcrypt \
php-bcmath \
php-soap \
php-xdebug

# Install composer
RUN curl "https://getcomposer.org/installer" -o /tmp/composer-installer.php && \
chmod 755 /tmp/composer-installer.php && \
php /tmp/composer-installer.php --install-dir=/tmp && \
mv /tmp/composer.phar /usr/local/bin/composer && \
chmod 755 /usr/local/bin/composer && \
rm /tmp/composer-installer.php

# Disable composer warning and xdebug extension
RUN echo "\nexport COMPOSER_ALLOW_SUPERUSER=1\n" >> /root/.bashrc && \
echo ";zend_extension=xdebug.so\n" > /etc/php/7.1/cli/conf.d/20-xdebug.ini && \
echo ";zend_extension=xdebug.so\n" > /etc/php/7.1/fpm/conf.d/20-xdebug.ini

# Cleanup
RUN apt-get -qq clean && \
apt-get -qq autoremove --purge && \
rm -rf \
/etc/php/5.6 \
/etc/php/7.0 \
/var/lib/apt/lists/* \
/usr/share/doc/* \
/usr/share/man/* \
/usr/share/info/* \
/usr/share/lintian/* \
/usr/share/locale/* \
/usr/lib/systemd/* \
/usr/lib/valgrind/* \
/var/log/alternatives.log \
/var/log/bootstrap.log \
/var/log/dpkg.log \
/var/log/apt/* \
/tmp/*
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
VERSION ?= "latest"
BASEIMAGE := "baseimage"
PHP := "php-5.6"
NODEJS := "nodejs-6"
PHP56 := "php-5.6"
PHP7 := "php-7"
NODEJS6 := "nodejs-6"

build:
IMAGE="baseimage" VERSION=$(VERSION) ./build_scripts/build.diet-image.sh
IMAGE=$(PHP) VERSION=$(VERSION) ./build_scripts/build.image.sh
IMAGE=$(NODEJS) VERSION=$(VERSION) ./build_scripts/build.image.sh
IMAGE=$(PHP56) VERSION=$(VERSION) ./build_scripts/build.image.sh
IMAGE=$(PHP7) VERSION=$(VERSION) ./build_scripts/build.image.sh
IMAGE=$(NODEJS6) VERSION=$(VERSION) ./build_scripts/build.image.sh

test:
IMAGE="baseimage" ./build_scripts/test.image.sh

publish:
IMAGE="baseimage" VERSION=$(VERSION) ./build_scripts/publish.image.sh
IMAGE=$(PHP) VERSION=$(VERSION) ./build_scripts/publish.image.sh
IMAGE=$(NODEJS) VERSION=$(VERSION) ./build_scripts/publish.image.sh
IMAGE=$(PHP56) VERSION=$(VERSION) ./build_scripts/publish.image.sh
IMAGE=$(PHP7) VERSION=$(VERSION) ./build_scripts/publish.image.sh
IMAGE=$(NODEJS6) VERSION=$(VERSION) ./build_scripts/publish.image.sh

.PHONY: build publish
.PHONY: build test publish

0 comments on commit b7c51fa

Please sign in to comment.