Skip to content

Commit

Permalink
fix: change the orther in which clean up is done
Browse files Browse the repository at this point in the history
  • Loading branch information
manekenpix committed Apr 16, 2021
1 parent c6238c8 commit 6f6e5aa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tools/autodeployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ docker volume prune -f
echo "Starting $ENV Environment"
docker-compose --env-file $ENV_FILE --project-name=$ENV up -d

# Will fail on final container
# this is anticipated and doesn't affect new environment
echo "Deleting $OLD Containers"
docker rmi $(docker images $OLD\_* -aq ) -f 2> /dev/null

# Delete all older containers which were build artifacts.
# On dev environment, this should reduce all usage by min ~20%
docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}') 2> /dev/null
echo "Removing dangling images"
docker rmi $(docker images -f "dangling=true" -q)


echo "Removing $OLD Environment"
docker rmi $(docker images $OLD\_* -aq ) -f 2> /dev/null

0 comments on commit 6f6e5aa

Please sign in to comment.