docker run --rm -it ntrrg/htpasswd [OPTIONS] USERNAME [PASSWORD > .htpasswd]
For more information about htpasswd
options see https://httpd.apache.org/docs/2.4/programs/htpasswd.html
Working on this project I use/used:
Apache Team. htpasswd - Manage user files for basic authentication https://httpd.apache.org/docs/2.4/programs/htpasswd.html