It is not safe to run the container with root user privileges without any restrictions. You mounted the host directory into container, and common user run as root in container, they can perform any dangerous operations with root privileges. For example:
run a container
build a program named hack, put it in the directory you mounted
chmod +xs hack
exit container
cd to the directory, run this program
hack program code(in Golang):
package main
import "os"
func main() {
os.RemoveAll("/root")
}
Use this code, common user can delete root directory, can also perform any dangerous operation in this way
It is not safe to run the container with root user privileges without any restrictions. You mounted the host directory into container, and common user run as root in container, they can perform any dangerous operations with root privileges. For example:
hack program code(in Golang):
Use this code, common user can delete root directory, can also perform any dangerous operation in this way