Docker containers are always run as
root user by default. As a result all running processes, shared volumes, folders, files will be owned by
root user. It becomes real problem when we need to modify files and folder in shared folders within host OS or docker container.
In order to solve such issue, we need to match host OS and docker container user’s
UID s. The
UID is always
0 . Running docker as
root user is also considered as a bad security practice.