Fix messages and rebuild without cache
This commit is contained in:
		@@ -21,7 +21,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q dovecot)" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi dovecot
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q rmilter)" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local image and repull? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi memcached
 | 
			
		||||
 
 | 
			
		||||
@@ -50,7 +50,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q mysql:${DBVERS})" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local image and repull? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi mysql:${DBVERS}
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q nginx:${NGINXVERS})" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild/pull anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local image and repull? [y/N] " response
 | 
			
		||||
    response=${response,,}    # tolower
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi nginx:${NGINXVERS}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q php:${PHPVERS})" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild/pull anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local image and repull? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi php:${PHPVERS}
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q postfix)" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi postfix
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q redis:${DBVERS})" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild/pull anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local image and repull? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi redis:${DBVERS}
 | 
			
		||||
 
 | 
			
		||||
@@ -12,11 +12,11 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
build() {
 | 
			
		||||
	docker build -t rmilter data/Dockerfiles/rmilter/.
 | 
			
		||||
	docker build --no-cache -t rmilter data/Dockerfiles/rmilter/.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q rmilter)" ]]; then
 | 
			
		||||
	read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
 | 
			
		||||
	response=${response,,}
 | 
			
		||||
	if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
		docker rmi rmilter
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
NAME="rspamd-mailcow"
 | 
			
		||||
 | 
			
		||||
build() {
 | 
			
		||||
    docker build -t rspamd data/Dockerfiles/rspamd/.
 | 
			
		||||
    docker build --no-cache -t rspamd data/Dockerfiles/rspamd/.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
echo "Stopping and removing containers with name tag ${NAME}..."
 | 
			
		||||
@@ -16,7 +16,7 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q rspamd)" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild/pull anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
 | 
			
		||||
    response=${response,,}
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi rspamd
 | 
			
		||||
 
 | 
			
		||||
@@ -12,11 +12,11 @@ if [[ ! -z $(docker ps -af "name=${NAME}" -q) ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
build() {
 | 
			
		||||
	docker build -t sogo data/Dockerfiles/sogo/.
 | 
			
		||||
	docker build --no-cache -t sogo data/Dockerfiles/sogo/.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [[ ! -z "$(docker images -q sogo)" ]]; then
 | 
			
		||||
    read -r -p "Found image locally. Rebuild anyway? [y/N] " response
 | 
			
		||||
    read -r -p "Found image locally. Delete local and rebuild without cache anyway? [y/N] " response
 | 
			
		||||
    response=${response,,}    # tolower
 | 
			
		||||
    if [[ $response =~ ^(yes|y)$ ]]; then
 | 
			
		||||
        docker rmi sogo
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user