How does the docker container access the host’s database service

  docker, question

How does the docker container access the host’s database service

This is not recommended. This is not the original intention of docker’s design. If you have to do this, please refer to:https://stackoverflow.com/que …

You can also use the –network=host parameter directly, which will directly expose all local ports to the docker container. You can do your own local experiments, and the product environment is not recommended.