Run the following command:
docker inspect -f '{{.Config.Hostname}}' 容器名
Recommended related tutorials: docker tutorial
The above is the detailed content of How to get docker container hostname. For more information, please follow other related articles on the PHP Chinese website!