The uid/gid is constrained by the image build.
This isn't extremely flexible.
Another option is to use a runtime entrypoint to recreate a user on-demand.
I'm prototyping suhc a variant in https://github.com/olberger/docker-modelio if one find this interesting (based on a previous fork of this repo)