The Wizards and the Warriors, aka Wizard War, by Hugh Cook. First volume of his "Chronicles of an Age of Darkness" series. I, living in the USA, read the Wizard War edition around the same time you did (toward the end of the 1980s), which is not surprising when we consider that ISFDB says that the first edition in the UK was released in 1986, and the USA's Wizard War version debuted in the stores in 1987.
Here's a cover-scan of the paperback edition I bought and read.
The main plot point that you remembered is reflected in what's happening on the cover. Clearly meant to remind us of such things as the story of Aladdin and the Lamp from the 1001 Arabian Nights, and the loosely-inspired-by-it TV series I Dream of Jeannie from the 1960s. Jeannie the Genie, for instance, could put herself inside her magic bottle, which seemed much larger on the inside than it looked from the outside (probably because the magic had shrunk her down when she turned into smoke and moved into it).
Hugh Cook adapted some of that idea, but without there being a powerful genie involved who would grant you a series of wishes if you were the new owner of the lamp or the bottle in which the genie was housed. In his version, if you pick up a magic ring and put it on your finger, you are sucked into the nearby magic bottle which is laid out like a multi-floor palace full of all sorts of things -- stores of food and drink, as I recall, various types of weapons, treasure, books, furniture, etc. In addition, the first bottle turns out to have a second bottle stored in one room, and a wizard character discovers this when he first finds the matching ring, puts it on, and suddenly finds himself exploring the depths of the bottle-within-a-bottle.
The two bottles were depopulated by the time the main characters stumbled across them. Someone in a previous generation had gone to a lot of trouble to get them fully stocked for emergencies, but in the long run it hadn't done that person (a king, or something) much good. (My memory of the details is blurred after so many years since I last looked at this book.) I do remember that later in the book, the bottles are put to good use during a war effort after the main characters have had time to consider the fine points of how the magic works for putting people or other objects into those bottles, and then bringing them out again in a hurry (if that is what you want to do).
As I said, this was the first of a long series, most of which I have never read. I found the book very entertaining, but if you find a copy to refresh your memory, and feel you're getting hooked, be warned that Cook is quite capable of having one volume start thousands of miles away from the main setting of a previous one, and suddenly introducing a bunch of different characters to be stars of the latest volume. It can get disconcerting. He was trying to describe events in an entire world over a period of decades, and he didn't contrive excuses to have one special hero personally witness practically everything that happened, book after book.
All that caught me by surprise when, having enjoyed this volume, I subsequently (over a period of a few years) found copies of the next few books and read them too. I never bothered to read all that were published, and a Wikipedia article tells me that Cook's original outline called for a grand total of 60 volumes, arranged in three sets of 20 each, with "Chronicles of an Age of Darkness" being the series title for the first 20. But the sales were not wonderful, and only the first 10 volumes were finished and published in the period from 1986 to 1992. (Hugh Cook died in 2008.)
P.S. I checked, and found that the first book does not appear to have ever been turned into a Kindle edition. But you can find old copies of the British and U.S. paperback editions on Amazon. (I've inserted hyperlinks.)