Drone ignore folder in mounted volume

Any support for ignoring folders from being mounted to the container when running drone locally via drone exec? Maybe like .droneignore file?

Use case: I want to run the drone locally in my machine. My project dependencies are already in my local machine. But some dependencies like sharp library requires some OS dependencies. Since OS in the container is obviously different from my local machine, the build step fails. This means I must nuke the node_modules first in my local machine such that the folder is not mounted in the container before every drone exec command.

The .dockerignore approach would not work because drone does not copy / stream files or folders from the workspace (which is what docker is doing). Instead, Drone mounts a volume which means all files and folders in that volume are exposed to your pipeline.

You could, however, write a simple shell script that wraps drone exec and copies relevant files and folders to a temp directory, excluding your node_modules, for execution. Here is a simple example:

mkdir -p $TEMP
rsync -av --progress $(pwd)/ $TEMP --exclude .git --exclude node_modules
pushd $TEMP
drone exec