Atomic cavity with light-induced mirrors