How to correctly mount my file/system or application files using docker compose?

The problem is that, by virtue of the CircleCI architecture, you cannot use on-host volumes. They only work locally, but CircleCI hooks into Docker to spin up containers on remote boxes, and volumes don’t work over LAN connections.

There’s a solution involving docker create in the link you have given. Or, the way I do it, is to bake a new Docker image with everything it needs, and run that. That makes sense for me anyway, since I need the image artefact for deployment.