NC can use any already mounted locally attached storage as its data folder. It’s a parameter in your NC config.php.
It’s easier to do this on a new installation (since you won’t have files that’ll need to be moved from the old data location to the new one). Will you need to migrate any existing data?
Since you’re using Docker, the other variable will be how you’re managing your persistent data for your containers (named volumes versus bind mounts). The answer will determine where your persistent data is really being stored on your Docker host and, in turn, how and where your external drive needs to be integrated into your system.