docker-prune: added network prune; docker-deploy: only create directories with absolute path name

master
Marc Wäckerlin 5 years ago
parent 5e426c5740
commit f4314812db
  1. 2
      docker-deploy
  2. 2
      docker-prune

@ -49,7 +49,7 @@ for f in $*; do
exit 1
fi
echo "... deploying ${f##*/}"
for d in $(sed -n 's/^ *source: *//p' ${f}.yaml); do
for d in $(sed -n 's,^ *source: \(/.*\),\1,p' ${f}.yaml); do
test -e $d || mkdir -p $d
done
docker stack deploy --compose-file ${f}.yaml ${f##*/}

@ -137,9 +137,11 @@ trap 'traperror "$? ${PIPESTATUS[@]}" $LINENO $BASH_LINENO "$BASH_COMMAND" "${FU
if test -z "$filter"; then
run docker container prune -f
run docker volume prune -f
run docker network prune -f
run docker image prune -a -f
else
run docker container prune -f --filter "$filter"
run docker volume prune -f
run docker network prune -f
run docker image prune -a -f --filter "$filter"
fi

Loading…
Cancel
Save