Docker compose disable internet for containers

Hi,

I am trying to achieve containers to be able to communicate to each other while internet is disabled for the bridged network. Is it possible?