I have constructed an x86 docker container, containing an armv8 gcc toolchain for cross-compilation of my C++ software. The idea is that I can use the docker container to cross-compile my software and then transfer the resulting binaries to a Raspberry Pi. This all works fine, manually.
What I'd like to do is integrate this with JetBrains CLion, somehow. I know that a docker container can be set up as a Remote Host (via ssh), but this would build and try to execute the binaries within the container. What I'd like to do instead is build the binaries within the container, then deploy them to an alternative Remote Host (i.e. the Raspberry Pi) for execution, and eventually debugging.
Is there an appropriate workflow supported by CLion? Is it possible to configure a Toolchain remote host and a separate Deployment remote host? From what I can see CLion only lets you select a single environment (i.e. CMake config) for a build, and that is where the resultant binary ends up executing.