Running Docker on Google Cloud Instance with data in gcsfuse-mounted Bucket

I am trying to run a Docker container to analyze data in a Google Cloud Bucket.

I have been able to successfully mount the Bucket using gcsfuse, and I tested that I could do thinks like create and delete files within the Bucket.

In order to be able to install other programs (and mount the bucket), I installed Docker (and didn’t use the Docker-optimized instance option). If I run Docker in interactive mode (without mounting a drive), it looks like it is working OK.

However, if I try to run Docker in interactive mode with the mounted drive (which is the gcsfuse-mounted Bucket), I get an error message:

[email protected]:~/bucket-name/subfolder$ docker run -it -v /home/user/bucket-name:/mnt/bucket-name
docker: Error response from daemon: error while creating mount source path '/home/user/bucket-name': mkdir /home/user/bucket-name: file exists.

I hope that I am close to having this working: does anybody have any ideas about a relatively simple fix for this error message?

BTW, I realize that there are other ways to run DeepVariant on Google Cloud, but I am trying to makes things as similar as possible to what I am doing on AWS (plus, I may need to do some extra troubleshooting for analysis of one of my files).

Thank you very much for your help!


FYI, this is how I mounted the Bucket:

#mount directory:
export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
echo "deb $GCSFUSE_REPO main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
curl | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install gcsfuse

#restart and mount directory:
mkdir [bucket-name]
gcsfuse [bucket-name] ./[bucket-name]

and this is how I installed Docker:

#install Docker for Debian:
sudo apt-get update
sudo apt-get -y install 
curl -fsSL | sudo apt-key add -

sudo add-apt-repository 
   "deb [arch=amd64] 
   $(lsb_release -cs) 
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli

#fix Docker sock issue:
sudo usermod -a -G docker [user]
#have to restart after this

Source: StackOverflow