On the end that will stay stationary, glue a piece of elastic to top (inside), super glue that endcap to the tube. Glue the other end of elastic (you should be able to judge the amount you need to get a snug fit) to the top endcap which will not be glued onto the tube.
Does that make sense?