[BRE-1009] Update Docker image purge logic to be more thorough (#440)
* removed logic for excluding the setup image from being purged. all BW images will be removed when purging.
* added certbot image cleanup logic to run.sh
* added certbot image cleanup logic to run.ps1
* added missing rebuild line to parameter block
$response=$(Read-Host"The [certbot/certbot] container image used by this script is no longer associated with any containers. Would you like to purge it? (y/N)")
@ -310,6 +318,21 @@ function pullSetup() {
@@ -310,6 +318,21 @@ function pullSetup() {
docker pull ghcr.io/bitwarden/setup:$COREVERSION
}
function certbotCleanup(){
# Check if the certbot image is being used by any containers
if[[ -z $(docker ps -a --filter ancestor=certbot/certbot --quiet)]]
then
echo -e -n "${RED}(!) The [certbot/certbot] container image used by this script is no longer associated with any containers. Would you like to purge it? (y/N): ${NC}"