Skip to content

Commit

Permalink
Handle multiple database containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammedz93 committed Jun 28, 2023
1 parent 9ba90d1 commit 4f11c0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion files/image_config/reset-factory/reset-factory
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ if [ "$FACTORY_TYPE" != "only-config" ]; then
fi

echo "Remove all docker containers"
docker rm -f $(docker ps -a -q | grep -v $(docker ps -a -q -f "name=database")) > /dev/null
database_array=($(docker ps -a -q -f "name=database"))
docker rm -f $(docker ps -a -q | egrep -v $(IFS='|'; echo "${database_array[*]}")) > /dev/null

echo "Clear sonic directory"
clear_sonic_dir
Expand Down

0 comments on commit 4f11c0e

Please sign in to comment.