I created a docker for elk with all security plugins , and even i instead data in ES by curl method and checked it was working fine .
when i stop the docker and run again the their is no data what i have inserted before ..
It is quite possible that after stopping that container, you are not re-starting that same container, but creating a new container.
To fix this, do a “docker ps -a” and look for that container where you installed plugins and restart that same container. You should see all of that data preserved in that container.