To build the image use:
docker build -t env/test --build-arg uid=$UID .
It sets the uid of the user within the image to the uid of the host. When sharing volumes it allows the user within the image to write into the shared volume.
To run the image interactivelly with file sharing:
docker run -it -v Path/on/my/machine:Path/on/the/image env/test