Unable to compile c++ code on architecture 'aarch64'

I’m running on a Macbook, with an Apple M1 Pro chip. I’m trying to run a build for my project which contains c++ code, which needs to be compiled on Linux. I’m running this on a Docker container that is running an Ubuntu image.

When I attempt the build, at the point where Gradle is trying to build the native code, I get the following message:

- Tool chain 'gcc' (GNU GCC):
    - Don't know how to build for host operating system 'Linux' architecture 'aarch64'.

Please help, I am blocked at this point