mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 04:47:52 +00:00
Update Docker update script
This commit is contained in:
parent
58da41ab85
commit
bb201d86b1
149
update-docker.sh
149
update-docker.sh
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh -eu
|
||||||
#
|
#
|
||||||
# This script will pull all Docker images that are currently
|
# This script will pull all Docker images that are currently
|
||||||
# bound to your devilbox git state.
|
# bound to your devilbox git state.
|
||||||
@ -7,114 +7,85 @@
|
|||||||
# in order to download all images locally.
|
# in order to download all images locally.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
WHICH="all"
|
||||||
|
if [ "${#}" -eq "1" ]; then
|
||||||
|
if [ "${1}" = "bind" ]; then
|
||||||
|
WHICH="bind"
|
||||||
|
elif [ "${1}" = "php" ]; then
|
||||||
|
WHICH="php"
|
||||||
|
elif [ "${1}" = "httpd" ]; then
|
||||||
|
WHICH="httpd"
|
||||||
|
elif [ "${1}" = "mysql" ]; then
|
||||||
|
WHICH="mysql"
|
||||||
|
elif [ "${1}" = "rest" ]; then
|
||||||
|
WHICH="rest"
|
||||||
|
else
|
||||||
|
echo "Error: Unknown option"
|
||||||
|
echo "Supported: php, httpd, mysql, rest"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Path of devilbox repository
|
### Path of devilbox repository
|
||||||
###
|
###
|
||||||
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### DNS
|
### BIND
|
||||||
###
|
###
|
||||||
TAG="$( grep '^[[:space:]]*image:[[:space:]]*cytopia/bind' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )"
|
if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "bind" ]; then
|
||||||
docker pull cytopia/bind:${TAG}
|
TAG="$( grep '^[[:space:]]*image:[[:space:]]*cytopia/bind' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )"
|
||||||
|
docker pull cytopia/bind:${TAG}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### PHP
|
### PHP
|
||||||
###
|
###
|
||||||
TAG="$( grep '^[[:space:]]*image:.*\${PHP_SERVER' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )"
|
if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "php" ]; then
|
||||||
docker pull devilbox/php-fpm:5.3-work
|
SUFFIX="$( grep -E '^\s+image:\s+devilbox/php-fpm' "${CWD}/docker-compose.yml" | sed 's/.*}//g' )"
|
||||||
docker pull devilbox/php-fpm:5.4-work
|
IMAGES="$( grep -Eo '^#*PHP_SERVER=[.0-9]+' "${CWD}/env-example" | sed 's/.*=//g' )"
|
||||||
docker pull devilbox/php-fpm:5.5-work
|
echo "${IMAGES}" | while read version ; do
|
||||||
docker pull devilbox/php-fpm:5.6-work
|
docker pull devilbox/php-fpm:${version}${SUFFIX}
|
||||||
docker pull devilbox/php-fpm:7.0-work
|
done
|
||||||
docker pull devilbox/php-fpm:7.1-work
|
fi
|
||||||
docker pull devilbox/php-fpm:7.2-work
|
|
||||||
docker pull devilbox/php-fpm:7.3-work
|
|
||||||
#docker pull cytopia/hhvm-latest:${TAG}
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### HTTPD
|
### HTTPD
|
||||||
###
|
###
|
||||||
TAG="$( grep '^[[:space:]]*image:.*\${HTTPD_SERVER' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )"
|
if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "httpd" ]; then
|
||||||
docker pull devilbox/nginx-stable:${TAG}
|
SUFFIX="$( grep -E '^\s+image:\s+devilbox/\${HTTPD_SERVER' "${CWD}/docker-compose.yml" | sed 's/.*://g' )"
|
||||||
docker pull devilbox/nginx-mainline:${TAG}
|
IMAGES="$( grep -Eo '^#*HTTPD_SERVER=[-a-z]+[.0-9]*' "${CWD}/env-example" | sed 's/.*=//g' )"
|
||||||
docker pull devilbox/apache-2.2:${TAG}
|
echo "${IMAGES}" | while read version ; do
|
||||||
docker pull devilbox/apache-2.4:${TAG}
|
docker pull devilbox/${version}:${SUFFIX}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### MYSQL
|
### MYSQL
|
||||||
###
|
###
|
||||||
TAG="$( grep '^[[:space:]]*image:.*\${MYSQL_SERVER' "${CWD}/docker-compose.yml" | sed 's/^.*://g' )"
|
if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "mysql" ]; then
|
||||||
docker pull cytopia/mysql-5.5:${TAG}
|
SUFFIX="$( grep -E '^\s+image:\s+cytopia/\${MYSQL_SERVER' "${CWD}/docker-compose.yml" | sed 's/.*://g' )"
|
||||||
docker pull cytopia/mysql-5.6:${TAG}
|
IMAGES="$( grep -Eo '^#*MYSQL_SERVER=[-a-z]+[.0-9]*' "${CWD}/env-example" | sed 's/.*=//g' )"
|
||||||
docker pull cytopia/mysql-5.7:${TAG}
|
echo "${IMAGES}" | while read version ; do
|
||||||
docker pull cytopia/mysql-8.0:${TAG}
|
docker pull cytopia/${version}:${SUFFIX}
|
||||||
docker pull cytopia/mariadb-5.5:${TAG}
|
done
|
||||||
docker pull cytopia/mariadb-10.0:${TAG}
|
fi
|
||||||
docker pull cytopia/mariadb-10.1:${TAG}
|
|
||||||
docker pull cytopia/mariadb-10.2:${TAG}
|
|
||||||
docker pull cytopia/mariadb-10.3:${TAG}
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### PGSQL
|
### Rest of the fucking owl
|
||||||
###
|
###
|
||||||
docker pull postgres:9.1
|
### For all other non-base service, only download the currently enabled one
|
||||||
docker pull postgres:9.2
|
|
||||||
docker pull postgres:9.3
|
|
||||||
docker pull postgres:9.4
|
|
||||||
docker pull postgres:9.5
|
|
||||||
docker pull postgres:9.6
|
|
||||||
docker pull postgres:10.0
|
|
||||||
docker pull postgres:10.1
|
|
||||||
docker pull postgres:10.2
|
|
||||||
docker pull postgres:10.3
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### REDIS
|
if [ "${WHICH}" = "all" ] || [ "${WHICH}" = "rest" ]; then
|
||||||
###
|
if [ ! -f "${CWD}/.env" ]; then
|
||||||
docker pull redis:2.8
|
cp "${CWD}/env-example" "${CWD}/.env"
|
||||||
docker pull redis:3.0
|
fi
|
||||||
docker pull redis:3.2
|
docker-compose --project-directory "${CWD}" --file "${CWD}/docker-compose.yml" pull
|
||||||
docker pull redis:4.0
|
fi
|
||||||
|
|
||||||
###
|
|
||||||
### MEMCACHED
|
|
||||||
###
|
|
||||||
docker pull memcached:1.4.21
|
|
||||||
docker pull memcached:1.4.22
|
|
||||||
docker pull memcached:1.4.23
|
|
||||||
docker pull memcached:1.4.24
|
|
||||||
docker pull memcached:1.4.25
|
|
||||||
docker pull memcached:1.4.26
|
|
||||||
docker pull memcached:1.4.27
|
|
||||||
docker pull memcached:1.4.28
|
|
||||||
docker pull memcached:1.4.29
|
|
||||||
docker pull memcached:1.4.30
|
|
||||||
docker pull memcached:1.4.31
|
|
||||||
docker pull memcached:1.4.32
|
|
||||||
docker pull memcached:1.4.33
|
|
||||||
docker pull memcached:1.4.34
|
|
||||||
docker pull memcached:1.4.35
|
|
||||||
docker pull memcached:1.4.36
|
|
||||||
docker pull memcached:1.4.37
|
|
||||||
docker pull memcached:1.4.38
|
|
||||||
docker pull memcached:1.4.39
|
|
||||||
docker pull memcached:1.5.0
|
|
||||||
docker pull memcached:1.5.1
|
|
||||||
docker pull memcached:1.5.2
|
|
||||||
docker pull memcached:1.5.3
|
|
||||||
docker pull memcached:1.5.4
|
|
||||||
docker pull memcached:1.5.5
|
|
||||||
docker pull memcached:latest
|
|
||||||
|
|
||||||
###
|
|
||||||
### MONGODB
|
|
||||||
###
|
|
||||||
docker pull mongo:2.8
|
|
||||||
docker pull mongo:3.0
|
|
||||||
docker pull mongo:3.2
|
|
||||||
docker pull mongo:3.4
|
|
||||||
docker pull mongo:3.5
|
|
||||||
docker pull mongo:3.6
|
|
||||||
docker pull mongo:3.7
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user