My host is linux. In linux I'm logged in as a hostuser(id=1745118974). I'm running a docker container (image downloaded from dockerhub). There is an user dockeruser(id=1001) inside the container.
I want to use tools available from container. And I need to mount the data from my host for the tools.
So I'm doing
docker run -it --rm -v $HOME/data:/data imagename:tag bash
And the issue is that /data inside the container is now owned by uid=1745118974,gid=1745118974 . And dockeruser(id=1001) cannot read or write it.
How do I configure my run so I can read/write the data on host as hostuser and read/write the data from inside the container as dockeruser?
Thank you