Access /var/lib/docker/volumes as a non-root user?

Hi

I’ve just started using docker (v 20.10.12) on raspberry pi buster.

The docker container runs perfectly; my problem is accessing a docker volume from the host, i.e. directories similar to:

/var/lib/docker/volumes/xyz/_data

I’d like to access these as a non root user - is this possible?

My problem is the permissions on the host file system:

drwx--x--- 12 root root 4096 Mar 9 10:48 /var/lib/docker

I can grant everyone execute permission (chmod 711 docker) and this solves the issue.

However, when dockerd is restarted the permissions revert to 710.

Using chmod does not feel like the correct solution.

Is there a better way to allow a non root host user to access the files stored in volumes?

Thanks

Andrew