Remote (docker) running and testing with CLion

I have been using Rust and Clion and loving it. Now, though, I want to be able to compile and run my rust code inside a docker container. I can spin up the container pretty easily and run things just fine. But, does anyone know how to setup CLion run configurations to compile and run my program? The real question is “how can I run tests remotely and use CLion’s built in test runners and such?”

PS: On a related note, I’ve been trying to get remote debugging setup with gdbserver. I’ve done it before using a raspberry pi, but can’t get it to run with docker. I’ve got a SO question here if anyone wants some points

I’m going to close this thread in favor of a more specific thread.