The cluster has not formed yet, i.e. its health RED. Error of the security index is a victim of it. You need fix the cluster formation issue first. If cache is the issue as suggested by this post, I guess it might be related to the persistent volume created by docker-compose. If what you want is a fresh cluster, you should delete them. You can check the volume with something like
docker volume ls
and delete the relevant ones declared in the docker compose file. NOTE please be sure that you absolutely do not need any data from the volumes before deleting because you will not be able to recover them later.