Skip to content

Commit

Permalink
Pull images first and do not use cache during build
Browse files Browse the repository at this point in the history
  • Loading branch information
bheisig committed Jul 22, 2019
1 parent cc7cee8 commit 7201e3e
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function execute {
"push")
pushImages
;;
"pull")
pullImages
;;
"print")
printReadme
;;
Expand Down Expand Up @@ -60,6 +63,28 @@ function buildImages {
buildImage 1.13 pro php7.3 fpm
}

function pullImages {
pullImage php:7.4-rc-fpm-stretch
pullImage php:7.4-rc-apache-stretch
pullImage php:7.3-fpm-stretch
pullImage php:7.3-apache-stretch
pullImage php:7.2-fpm-stretch
pullImage php:7.2-apache-stretch
pullImage php:7.1-fpm-stretch
pullImage php:7.1-apache-stretch
pullImage php:7.0-fpm-stretch
pullImage php:7.0-apache-stretch
}

function pullImage {
local image="$1"

log "Pull $image from repository"

docker pull "$image" || \
abort "No pull"
}

function buildImage {
local version="$1"
local edition="$2"
Expand All @@ -71,8 +96,9 @@ function buildImage {
log "Build $tag from $path"

docker build \
"$path" \
-t "$tag" || \
-t "$tag" \
--no-cache \
"$path" || \
abort "No build"
}

Expand Down Expand Up @@ -308,7 +334,7 @@ function printSupportedTags {
}

function printUsage {
abort "build|test|push|print"
abort "test|pull|build|push|print"
}

function finish {
Expand Down

0 comments on commit 7201e3e

Please sign in to comment.