Right click on the bookshelf adjacent to the container to open the chest.
The chest adjacent to the bookshelf will open even if there is not enough room for it normally to open.
Hide containers one block adjacent to the bookshelf blocks, for instance under them.