$ docker pull mongo:4.4.9
$ docker images
$ docker run -itd --name mongo -p 27017:27017 mongo --auth
$ docker exec -it mongo mongo admin
db.createUser({ user:‘admin’,pwd:‘KDxRpxz0HrGaQsaH’,roles:[ { role:‘userAdminAnyDatabase’, db: ‘admin’},“readWriteAnyDatabase”]});
db.auth(‘admin’, ‘KDxRpxz0HrGaQsaH’)