A Docker container to build ARM cortex-m target with gcc through a bind working directory.
docker build -t docker-arm-cm .
cd <to target project directory>
docker run -it --mount type=bind,source="$(pwd)",destination=/target docker-arm-cm
Then your work directory should be bind in /target
.