Run the sshd with supervisord in a docker container with non root user.
I am running supervisord with root user. It is working fine. Since we started re writing our docker files with best practices.
We want to start the sshd process with supervisord with non root user in docker containers.
Help me regarding this.
An ssh daemon intrinsically requires root-level access to be able to read the encrypted password file and to be able to switch to the authenticated user. You can't run it as non-root. If a supervisord process is launching it, that means supervisord must run as root as well.
If you're aiming for Docker best practices, standard containers rarely run ssh daemons, and you should generally run only one main process in a container. I'd try to remove both the sshd and supervisord if you can and limit your containers to only running single application processes. You can generally run just Nginx, or just a Flask application, or ... as a non-root user without much trouble.