From f2b9c55de22e1e89922bd957658bed4efd45ed02 Mon Sep 17 00:00:00 2001 From: Wade Barnes Date: Fri, 10 Sep 2021 08:53:13 -0700 Subject: [PATCH] Update the remaining direct calls to docker compose - A few explicit calls to docker compose were missed in the previous commit. Signed-off-by: Wade Barnes --- manage | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/manage b/manage index 2b70d42..0d879d3 100755 --- a/manage +++ b/manage @@ -450,7 +450,7 @@ function generateSecrets() { function backup() { ( _msg=$@ - volumes=$(docker -l ERROR compose config --volumes) + volumes=$(${dockerCompose} config --volumes) timeStamp=`date +\%Y-\%m-\%d_%H-%M-%S` datePart=${timeStamp%%_*} timePart=${timeStamp#*_} @@ -462,6 +462,7 @@ function backup() { fi for volume in ${volumes}; do + volume=$(echo ${volume} |sed 's~\r$~~') sourceVolume=${COMPOSE_PROJECT_NAME}_${volume} archiveName=${sourceVolume}_${timeStamp}.tar.gz archivePath="/${backupDir}/${archiveName}" @@ -487,8 +488,9 @@ function restore() { archiveSuffix="${datePart}_${timePart}" if promptForConfirmation "You are about to restore from the '${archiveDirectory}' backup set.\nYour existing data will be lost if not backed up first."; then - volumes=$(docker -l ERROR compose config --volumes) + volumes=$(${dockerCompose} config --volumes) for volume in ${volumes}; do + volume=$(echo ${volume} |sed 's~\r$~~') targetVolume=${COMPOSE_PROJECT_NAME}_${volume} archiveName=${targetVolume}_${archiveSuffix} archivePath="${archiveDirectory}/${archiveName}" @@ -626,7 +628,7 @@ function deleteVolumes() { _projectName=${COMPOSE_PROJECT_NAME:-docker} echoYellow \\n"Stopping and removing any running containers ..." - docker -l ERROR compose down -v + ${dockerCompose} down -v _pattern="^${_projectName}_\|^docker_" _volumes=$(docker volume ls -q | grep ${_pattern})