Running cli command in job that runs with dockerode with mounted volumes

Hi all,

I am node dev, most of our work falls within this real, we have just built a cli that runs a docker image through dockerode (node docker), and needs to mount the volume of the repo as it doing schemas, and yaml generation.

We just built a script made specifically for ci, to check the diff between schemas in main and current PR, using the above.

However when i run docker commands within a ci step, i cannot mount volumes… which is really annoying and then i found this:

360007324514-How-can-I-use-Docker-volume-mounting-on-CircleCI

Is there a solution that i am missing that doesnt involve rewriting a core part of the cli?

I am creating this post a more of a sanitary check, than anything :(…

for anyone that might have this bizarre requirement, this is how we went around it:

We pulled from dockerode, and created a wrapper around docker:

docker run -d --name <container-name> --rm --entrypoint tail <image> -f /dev/null
docker cp <your file path> <container-name>:<destination-path>
docker exec <container-name> <action that is needed from whatever cli>
docker stop -s 1 <container-name>