I want to run a docker container as an arbitrary user which is passed to the image while running it. For example docker run -u 1000 myimage
.
The above is possible. However I want to create a home directory with this user 1000 while starting the container(possibly through CMD) and do my container service stuff within that directory.
Is this possible and some pointers would be useful on ways to achieve it.