Add user management while accessing container

We’re using docker for our project. We’ve a monitoring service (for our native application) which is running on Docker. Currently there is no user management for this monitoring service. Is there any way we can add user management from Dockerfile? Please note that I’m not looking docker container user management. In simple words functionality that I’m looking for is:

  1. Add any user and password in dockerfile.
  2. While accessing external IP, same user and password must be provided to view running monitoring service.

Any leads will be highly appreciated.