I think you should export the environment variable CHECK_ROOT_INSTANCE_RUNNING:
docker exec -it b8587543289b bash
export CHECK_ROOT_INSTANCE_RUNNING=false
exit
docker exec -it b8587543289b /opt/karaf/bin/karaf
and if all you need is to insert a shell inside the container you can use this
docker exec -it b8587543289b bash