Installing MongoDB in Docker Issue

I tried to install MongoDB on Mac using docker. I followed the steps in this link: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-community-with-docker/, but when I ran the MongoDB in docker, I got this error.

2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}
2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"CONTROL",  "id":6278511, "ctx":"initandlisten","msg":"Shutting down the Change Stream Expired Pre-images Remover"}
2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
2023-10-19 10:01:51 {"t":{"$date":"2023-10-19T02:01:51.708+00:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":100}}
2023-10-19 10:07:33 {"t":{"$date":"2023-10-19T02:07:33.775+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
2023-10-19 10:07:33 Traceback (most recent call last):
2023-10-19 10:07:33   File "/usr/local/bin/docker-entrypoint.py", line 637, in <module>
2023-10-19 10:07:33     subprocess.run(get_final_command_line_args(), check=True)
2023-10-19 10:07:33   File "/usr/lib/python3.10/subprocess.py", line 526, in run
2023-10-19 10:07:33     raise CalledProcessError(retcode, process.args,
2023-10-19 10:07:33 subprocess.CalledProcessError: Command '['mongod', '--bind_ip_all']' returned non-zero exit status 100.
2023-10-19 10:07:57 Warning: File MONGO_INITDB_ROOT_USERNAME_FILE is deprecated. Use MONGODB_INITDB_ROOT_USERNAME_FILE instead.
2023-10-19 10:07:57 Warning: File MONGO_INITDB_ROOT_PASSWORD_FILE is deprecated. Use MONGODB_INITDB_ROOT_PASSWORD_FILE instead.

I installed the latest docker version, which is 24.0.6, build ed223bc. Any Idea how to solve this issue?