diff --git a/5.6.36-apache-xdebug/Dockerfile b/5.6.36-apache-xdebug/Dockerfile.template similarity index 91% rename from 5.6.36-apache-xdebug/Dockerfile rename to 5.6.36-apache-xdebug/Dockerfile.template index 9f104248..7f951f20 100644 --- a/5.6.36-apache-xdebug/Dockerfile +++ b/5.6.36-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM appsvc/php:5.6.36-apache_1805092223 +FROM reponame/php:5.6.36-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug-2.5.5 \ diff --git a/7.0.30-apache-xdebug/Dockerfile b/7.0.30-apache-xdebug/Dockerfile.template similarity index 91% rename from 7.0.30-apache-xdebug/Dockerfile rename to 7.0.30-apache-xdebug/Dockerfile.template index aa3e18b9..1514910c 100644 --- a/7.0.30-apache-xdebug/Dockerfile +++ b/7.0.30-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM appsvc/php:7.0.30-apache_1805092223 +FROM reponame/php:7.0.30-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug \ diff --git a/7.2.5-apache-xdebug/Dockerfile b/7.2.5-apache-xdebug/Dockerfile.template similarity index 92% rename from 7.2.5-apache-xdebug/Dockerfile rename to 7.2.5-apache-xdebug/Dockerfile.template index 33079b75..2cecc9cf 100644 --- a/7.2.5-apache-xdebug/Dockerfile +++ b/7.2.5-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM appsvc/php:7.2.5-apache_1805092223 +FROM reponame/php:7.2.5-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug-beta \ diff --git a/build-xdebug.sh b/build-xdebug.sh deleted file mode 100644 index 7379842d..00000000 --- a/build-xdebug.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# arg1: name of destination dockerhub -# arg2: dockerhub username -# arg3: dockerhub password - -set -x -e - -buildnumber=${4-$(date -u +"%y%m%d%H%M")} - -docker build -q --no-cache -t "$1"/php:5.6.36-apache-xdebug_"$buildnumber" 5.6.36-apache-xdebug -docker build -q --no-cache -t "$1"/php:7.0.30-apache-xdebug_"$buildnumber" 7.0.30-apache-xdebug -docker build -q --no-cache -t "$1"/php:7.2.5-apache-xdebug_"$buildnumber" -t "$1"/php:latest-xdebug_"$buildnumber" 7.2.5-apache-xdebug - -docker login -u "$2" -p "$3" - -docker push "$1"/php:5.6.36-apache-xdebug_"$buildnumber" -docker push "$1"/php:7.0.30-apache-xdebug_"$buildnumber" -docker push "$1"/php:7.2.5-apache-xdebug_"$buildnumber" -docker push "$1"/php:latest-xdebug_"$buildnumber" - -docker logout diff --git a/build.sh b/build.sh index 38085b06..2848245f 100755 --- a/build.sh +++ b/build.sh @@ -7,17 +7,34 @@ set -x -e buildnumber=${4-$(date -u +"%y%m%d%H%M")} -docker build -q --no-cache -t "$1"/php:5.6.36-apache_"$buildnumber" 5.6.36-apache -docker build -q --no-cache -t "$1"/php:7.0.30-apache_"$buildnumber" 7.0.30-apache -docker build -q --no-cache -t "$1"/php:7.2.5-apache_"$buildnumber" -t "$1"/php:latest_"$buildnumber" 7.2.5-apache -docker tag "$1"/php:latest_"$buildnumber" "$1"/php:latest - docker login -u "$2" -p "$3" +# build base images +docker build -q -t "$1"/php:5.6.36-apache_"$buildnumber" 5.6.36-apache +docker build -q -t "$1"/php:7.0.30-apache_"$buildnumber" 7.0.30-apache +docker build -q -t "$1"/php:7.2.5-apache_"$buildnumber" -t "$1"/php:latest_"$buildnumber" 7.2.5-apache +docker tag "$1"/php:latest_"$buildnumber" "$1"/php:latest + docker push "$1"/php:5.6.36-apache_"$buildnumber" docker push "$1"/php:7.0.30-apache_"$buildnumber" docker push "$1"/php:7.2.5-apache_"$buildnumber" docker push "$1"/php:latest_"$buildnumber" docker push "$1"/php:latest +# xdebug depends on base images +# generate dockerfile for xdebug +sed -e s/reponame/"$1"/g -e s/buildnumber/"$buildnumber"/g 5.6.36-apache-xdebug/Dockerfile.template > 5.6.36-apache-xdebug/Dockerfile +sed -e s/reponame/"$1"/g -e s/buildnumber/"$buildnumber"/g 7.0.30-apache-xdebug/Dockerfile.template > 7.0.30-apache-xdebug/Dockerfile +sed -e s/reponame/"$1"/g -e s/buildnumber/"$buildnumber"/g 7.2.5-apache-xdebug/Dockerfile.template > 7.2.5-apache-xdebug/Dockerfile + +# build xdebug images +docker build -q -t "$1"/php:5.6.36-apache-xdebug_"$buildnumber" 5.6.36-apache-xdebug +docker build -q -t "$1"/php:7.0.30-apache-xdebug_"$buildnumber" 7.0.30-apache-xdebug +docker build -q -t "$1"/php:7.2.5-apache-xdebug_"$buildnumber" -t "$1"/php:latest-xdebug_"$buildnumber" 7.2.5-apache-xdebug + +docker push "$1"/php:5.6.36-apache-xdebug_"$buildnumber" +docker push "$1"/php:7.0.30-apache-xdebug_"$buildnumber" +docker push "$1"/php:7.2.5-apache-xdebug_"$buildnumber" +docker push "$1"/php:latest-xdebug_"$buildnumber" + docker logout