The requirement we had was to have a google drive accessible inside a samba share on our SME Server (from koozali.org). The google drive client for linux does not work properly in Centos 7 so here we mount it on the Rocky Linux 8 host to then give access to the LXC SME server container.
get the grive linux client
wget -O drive https://drive.google.com/uc?id=0B3X9GlR6EmbnMHBMVWtKaEZXdDg
mv drive /usr/local/sbin
chmod +X /usr/local/sbin/drive
make a mount point on the host and also bind mount it to the guest container
In our case below the ibay is called "data" and we made a subfolder inside there called gdrive so that all users of this share can also see the google drive and read/write to it.
mkdir ~/gdrivefs
drive (will give you a URL for an auth code)
gdfstool auth -a /var/cache/gdfs/credcache "YOURAUTHCODE"
gdfs -o allow_other /var/cache/gdfs/credcache ~/gdrivefs
mount --bind /root/gdrivefs /var/lib/libvirt/lxc/sme/rootfs/home/e-smith/files/ibays/data/files/gdrive
It's necessary to restart the guest LXC container since bind mounts are applied on boot. If your container is already running restart it after the bind mount on the host.
automate auth code on boot
will later add instructions to automount this on boot (including auth)