To configure Docker Compose as a remote interpreter,
open the Settings/Preferences dialog &shortcut:ShowSettings;,
go to the Languages & Frameworks | Ruby SDK and Gems page.
Click
and select New remote....
In the invoked dialog, select Docker Compose and specify the required settings.

Learn more at Configure Docker as a remote interpreter.