|
@ -9,13 +9,20 @@ set -e |
|
|
|
|
|
|
|
|
ONLY_PUSH=$2 |
|
|
ONLY_PUSH=$2 |
|
|
|
|
|
|
|
|
|
|
|
function dot_version() { |
|
|
|
|
|
sed -r 's/^([[:digit:]])/\1./g' <<< $1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if [ -z "${ONLY_PUSH}" ]; then |
|
|
if [ -z "${ONLY_PUSH}" ]; then |
|
|
for PHP_VERSION in "${PHP_VERSIONS[@]}"; do |
|
|
for PHP_VERSION in "${PHP_VERSIONS[@]}"; do |
|
|
|
|
|
PHP_IMAGE=$(dot_version "${PHP_VERSION}") |
|
|
|
|
|
|
|
|
|
|
|
echo $PHP_IMAGE |
|
|
docker-compose build "php${PHP_VERSION}" && \ |
|
|
docker-compose build "php${PHP_VERSION}" && \ |
|
|
docker tag "src-php${PHP_VERSION}" "dimti/php:${PHP_VERSION}" |
|
|
|
|
|
|
|
|
docker tag "src-php${PHP_VERSION}" "dimti/php:${PHP_IMAGE}" |
|
|
|
|
|
|
|
|
docker-compose build "workspace${PHP_VERSION}" && \ |
|
|
docker-compose build "workspace${PHP_VERSION}" && \ |
|
|
docker tag "src-workspace${PHP_VERSION}" "dimti/workspace:${PHP_VERSION}" |
|
|
|
|
|
|
|
|
docker tag "src-workspace${PHP_VERSION}" "dimti/workspace:${PHP_IMAGE}" |
|
|
done |
|
|
done |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -23,7 +30,13 @@ WITH_PUSH=$1 |
|
|
|
|
|
|
|
|
if [ -n "${WITH_PUSH}" ]; then |
|
|
if [ -n "${WITH_PUSH}" ]; then |
|
|
for PHP_VERSION in "${PHP_VERSIONS[@]}"; do |
|
|
for PHP_VERSION in "${PHP_VERSIONS[@]}"; do |
|
|
docker push "dimti/php:${PHP_VERSION}" |
|
|
|
|
|
docker push "dimti/workspace:${PHP_VERSION}" |
|
|
|
|
|
|
|
|
PHP_IMAGE=$(dot_version "${PHP_VERSION}") |
|
|
|
|
|
|
|
|
|
|
|
echo "Push $PHP_IMAGE" |
|
|
|
|
|
echo |
|
|
|
|
|
|
|
|
|
|
|
docker push "dimti/php:${PHP_IMAGE}" && \ |
|
|
|
|
|
docker push "dimti/workspace:${PHP_IMAGE}" |
|
|
|
|
|
echo |
|
|
done |
|
|
done |
|
|
fi |
|
|
fi |