Skip to content

Commit

Permalink
Merge pull request #25 from patricklee2/build
Browse files Browse the repository at this point in the history
use build.sh to build xdebug as well
  • Loading branch information
rramachand21 authored May 22, 2018
2 parents 4c7e47d + 7ebdb9c commit 44bb079
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

RUN yes | pecl install xdebug-2.5.5 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

RUN yes | pecl install xdebug \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

RUN yes | pecl install xdebug-beta \
Expand Down
21 changes: 0 additions & 21 deletions build-xdebug.sh

This file was deleted.

27 changes: 22 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 44bb079

Please sign in to comment.